Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63938

Ability to access GH PR Comment Body during job triggered by PR Comment

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.204.1
      github-pr-comment-build 2.1

      Building off of issue#22 filed on GitHub, it would be helpful if there was a way to access the GitHub comment body that triggered the build.  This is particularly helpful in the case where a single pipeline is building/testing many different pieces of a project and you would like to control through PR comments, the rebuilding of any specific piece.

      Ideally this would place the comment body in an environment variable accessible from within the build:

      env.GITHUB_PR_COMMENT

      But would be equally helpful to be able to access it through the trigger cause object:

      currentBuild.getRawBuild().causes[0].getCommentBody()

            bksaville Brian Saville
            jebentier James Ebentier
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: