-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
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.