Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CREATE_WORK_ITEM to CREATE_OR_UPDATE_WORK_ITEM #83

Open
edmorley opened this issue Aug 2, 2020 · 0 comments
Open

Rename CREATE_WORK_ITEM to CREATE_OR_UPDATE_WORK_ITEM #83

edmorley opened this issue Aug 2, 2020 · 0 comments

Comments

@edmorley
Copy link
Member

edmorley commented Aug 2, 2020

Whilst reading the source to try and work out what gets synced and when, I saw the hook name CREATE_WORK_ITEM here:

name: 'CREATE_WORK_ITEM',

...which led to the impression that a work item would always be created whenever new labels were added. ie: If I swapped the labels around and switched from a bug to a user story, it seemed like Git2Gus would create a second work item rather than updating the original one.

However looking closer at the hook, I see it actually creates OR updates:

case 'CREATE_WORK_ITEM':
return await createOrUpdateWorkItem(task);

Renaming CREATE_WORK_ITEM to CREATE_OR_UPDATE_WORK_ITEM would make this clearer :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant