1
0
-1

I want to create labels on Github based on a Jira custom field value, how can I do that?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Jira Outgoing sync:

      replica.customFields."CF name" = issue.customFields."CF name"



      Gitub Incoming sync:

      def CfToLabel = ["Cf Value A": "Label1", "Cf Value B": "Label2"]
      
      def remoteValue = replica.customFields."CF name"?.value
      def localLabel = nodeHelper.getLabel(CfToLabel[remoteValue])
      if(localLabel && !issue.labels.contains(localLabel)){
        issue.labels += localLabel
      }
      
      

      That should work!

        CommentAdd your comment...