...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.
Whilst reading the source to try and work out what gets synced and when, I saw the hook name
CREATE_WORK_ITEM
here: https://github.com/forcedotcom/git2gus/blob/dbe8c53c7bf703d7607ca595ef0a473a843eb3b9/api/actions/createWorkItem.js#L118...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: https://github.com/forcedotcom/git2gus/blob/dbe8c53c7bf703d7607ca595ef0a473a843eb3b9/api/hooks/issues-hook/index.js#L20-L21
Renaming
CREATE_WORK_ITEM
toCREATE_OR_UPDATE_WORK_ITEM
would make this clearer :-)