Details

    • Similar Issues:

      Description

      When using the GitHub Organization Folder, none of the builds have the CHANGE_* variables set.

      I have tried both sh 'env | sort' and echo "${env.CHANGE_ID}".

      I'm expecting these to be set:

      • CHANGE_ID
      • CHANGE_URL
      • CHANGE_TITLE
      • CHANGE_AUTHOR
      • CHANGE_AUTHOR_DISPLAY_NAME
      • CHANGE_AUTHOR_EMAIL
      • CHANGE_TARGET

        Attachments

          Activity

          Hide
          docwhat Christian Höltje added a comment -

          > Seems like this was a configuration error (that the configuration options are non-obvious is a separate issue)

          No. It's more than that. I think something is wacky here.  It may just be the case that GitHub items should have different variables (e.g. PR_ vars) or something.

          My users (about 200 developers) are constantly tripping on this.  Some of the variables seem to imply they should always be set, instead of just for a PR.  e.g. If I push a new commit, shouldn't there be a record of the changes that triggered it?  Regardless of whether you are doing a "merged with base" or not.

          Show
          docwhat Christian Höltje added a comment - > Seems like this was a configuration error (that the configuration options are non-obvious is a separate issue) No. It's more than that. I think something is wacky here.  It may just be the case that GitHub items should have different variables (e.g. PR_ vars) or something. My users (about 200 developers) are constantly tripping on this.  Some of the variables seem to imply they should always be set, instead of just for a PR.  e.g. If I push a new commit, shouldn't there be a record of the changes that triggered it?  Regardless of whether you are doing a "merged with base" or not.
          Hide
          arpiatek Andrew Piatek added a comment - - edited

          Same comment as Christian. Can this be resolved? We are not using the dead plugin but rather Blue Ocean with GitHub Branch Source plugin.

          Show
          arpiatek Andrew Piatek added a comment - - edited Same comment as Christian. Can this be resolved? We are not using the dead plugin but rather Blue Ocean with GitHub Branch Source plugin.
          Hide
          amirbarkal Amir Barkal added a comment - - edited

          When configuring a multibranch pipeline repository to detect Pull Requests from GitHub, I get  the following CHANGE_* env variables populated properly:

          CHANGE_AUTHOR
          CHANGE_AUTHOR_DISPLAY_NAME
          CHANGE_BRANCH
          CHANGE_ID
          CHANGE_TARGET
          CHANGE_TITLE
          CHANGE_URL

           

          The CHANGE_AUTHOR_EMAIL var is critically missing from this list, which is paramount to alert users about regressions in their pull requests.

           

          Environment:

          Jenkins ver. 2.128 

          GitHub Branch Source Plugin 2.3.6 (latest)

          Pipeline: Multibranch 2.19 (latest)

          Show
          amirbarkal Amir Barkal added a comment - - edited When configuring a multibranch pipeline repository to detect Pull Requests from GitHub, I get  the following CHANGE_* env variables populated properly: CHANGE_AUTHOR CHANGE_AUTHOR_DISPLAY_NAME CHANGE_BRANCH CHANGE_ID CHANGE_TARGET CHANGE_TITLE CHANGE_URL   The  CHANGE_AUTHOR_EMAIL var is critically missing from this list, which is paramount to alert users about regressions in their pull requests.   Environment: Jenkins ver. 2.128  GitHub Branch Source Plugin 2.3.6 (latest) Pipeline: Multibranch 2.19 (latest)
          Hide
          barathwajas Barathwaja S added a comment - - edited

          Is there any progress on this? Need some of the above env. variables to be used in a project. Any ETA on this?

           

          Ref. JENKINS-40486

          Show
          barathwajas Barathwaja S added a comment - - edited Is there any progress on this? Need some of the above env. variables to be used in a project. Any ETA on this?   Ref.  JENKINS-40486
          Hide
          cortez222 Allin Cortez added a comment -

          It has been a while since any action on this page, mostly likely because it is a closed issue, but I am seeing the same problem as Amir Barkal was seeing above above. The listed CHANGE_* vars are set, but not CHANGE_AUTHOR_EMAIL.

          Environment:

          Using a multibranch job with the Branch Sources plugin using a github app for authentication.

          Jenkins 2.235.1
          GitHub API Plugin 1.114.3
          GitHub Branch Source Plugin 2.8.2
          GitHub plugin 1.30.0

          I am happy to open a separate ticket for this issue if someone suggests that.  My main reason for commenting here is to let others know that I am also seeing this problem, as it seems like if it is a valid problem, then it ought to affect many people.

          FWIW for now, I am planning on working around the issue by simply examining the email address belonging to the author of the most recent git revision on the PR branch.  However don't be mislead... I don't believe this solution is equivalent to what we should expect from CHANGE_AUTHOR_EMAIL, as I believe that email address ought to be whatever email address the PR author has set up in Github, which is not necessarily the same as the author of the most recent commit on the PR branch.

          I will also note that I am migrating from Bitbucket to Github, and the Bitbucket plugin does provide CHANGE_AUTHOR_EMAIL, so we should aim for feature parity here also.

           

          Show
          cortez222 Allin Cortez added a comment - It has been a while since any action on this page, mostly likely because it is a closed issue, but I am seeing the same problem as Amir Barkal was seeing above above. The listed CHANGE_* vars are set, but not CHANGE_AUTHOR_EMAIL. Environment: Using a multibranch job with the Branch Sources plugin using a github app for authentication. Jenkins 2.235.1 GitHub API Plugin 1.114.3 GitHub Branch Source Plugin 2.8.2 GitHub plugin 1.30.0 I am happy to open a separate ticket for this issue if someone suggests that.  My main reason for commenting here is to let others know that I am also seeing this problem, as it seems like if it is a valid problem, then it ought to affect many people. FWIW for now, I am planning on working around the issue by simply examining the email address belonging to the author of the most recent git revision on the PR branch.  However don't be mislead... I don't believe this solution is equivalent to what we should expect from CHANGE_AUTHOR_EMAIL, as I believe that email address ought to be whatever email address the PR author has set up in Github, which is not necessarily the same as the author of the most recent commit on the PR branch. I will also note that I am migrating from Bitbucket to Github, and the Bitbucket plugin does provide CHANGE_AUTHOR_EMAIL, so we should aim for feature parity here also.  

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              docwhat Christian Höltje
            • Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: