Jira Issue Key to Github

Originally asked by Jose Lobo on 25 September 2020 (original question)


What is the best way to send Jira Issue keys to Github?

For context: We can’t create fields in our Github instance. I feel like syncing the Jira issue key to the Github “label” field is not correct.

What do you recommend? Have you seen past use cases like this?


Answer by André Leroy-Beaulieu Castro on 25 September 2020

Hi,

In Github, since there are no custom fields, I would recommend whenever the github side receives the first synchronization back from Jira, to add a comment with the key of the corresponding Jira issue.

To accomplish this, you should add this in the incoming sync of the Github side and remove any other line that is setting the comments:

if(syncRequest.remoteSyncEventNumber == 1L){
   issue.comments = commentHelper.addComment(replica.key, comments)
}
issue.comments     = commentHelper.mergeComments(issue, replica)

Thanks,

André


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.