Expose GitHub App ID/Username to the pipeline

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      It would be great if GitHub Branch Source plugin would allow exposing configured GitHub App ID or username to the pipeline, so it can be used in one-time action steps. Consider such example:

       

      def comment_detected = false
      for (comment in pullRequest.comments) {
        if (comment.user == 'my-github-app[bot]') {
          comment_detected = true
          break;
        }
      }
      if (!comment_detected) {
        pullRequest.comment('PR preview website is deployed at: https://mywebsite.example.com/' + env.CHANGE_ID + '/home')
      } 

      It would be much cleaner to write

      if (comment.user == github.context.app) { .........

      without hardcoding username in the pipeline.

       

            Assignee:
            Unassigned
            Reporter:
            Vilius
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: