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

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

    • 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()

          [JENKINS-63938] Ability to access GH PR Comment Body during job triggered by PR Comment

          James Ebentier created issue -

          Brian Saville added a comment -

          The causes now works with your PR, I still haven't done anything with env vars, but you can open a separate issue for that if you'd still like it. I just don't have time to research what that would take at the moment.

          Brian Saville added a comment - The causes now works with your PR, I still haven't done anything with env vars, but you can open a separate issue for that if you'd still like it. I just don't have time to research what that would take at the moment.
          Brian Saville made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Comment [ Great post. But it seems to me that the last comment resembles spam. I mean [wordlewebsite.com|https://wordlewebsite.com/] and other ]
          Mark Waite made changes -
          Comment [ Having access to the comment body can allow for greater control over the pipeline and enable more efficient testing of specific pieces of the project. It can also provide additional context and information about the purpose of the build and any changes that may have been requested in the PR.

          Best Rummy app in 2023
          [Rummy Golds|https://rummy-golds.com/]
          [Rummy Bloc|https://rummy-bloc.com/]
          [Rummy ola|https://rummy-ola.com/]
          [Rummy most|https://rummy-most.in/]
          [Rummy ares|https://rummy-ares.in/]
          [Rummy Best|https://rummy-best.com/]
          [Rummy Glee|https://rummy-glee.com/]
          [Rummy Modern|https://rummyvips.com/]
          [Wordle|https://wordlely.com/]

          [Resso mod Apk|https://ressomodapk.net/]
          [myhindivoice |https://myhindivoice.com/]

           

            ]
          Mark Waite made changes -
          Comment [  I was doing some QAing of the latest release and noticed that _when_ I followed these steps the _body_ didn't autofill as I expected: https://drift-hunters.io ]
          Mark Waite made changes -
          Comment [  I was doing some QAing of the latest release and noticed that _when_ I followed these steps the _body_ didn't autofill as I expected: https://drift-hunters.io ]
          Mark Waite made changes -
          Comment [  I was doing some QAing of the latest release and noticed that _when_ I followed these steps the _body_ didn't autofill as I expected: https://drift-hunters.io ]
          Mark Waite made changes -
          Comment [ The developers behind the Hardesty [paper io|https://paperio2.io/] theme have clearly prioritized delivering a top-notch user experience. ]
          Mark Waite made changes -
          Comment [ It doesn't seem that this is possible today, but I may very likely be missing it. Sorry if that is the case.{color:#c1c7d0}  [Flappy Bird|https://flappy-bird.io/]{color} ]

            Unassigned Unassigned
            jebentier James Ebentier
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: