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

Pipeline plugin won't get updated PR github title

    Details

    • Similar Issues:

      Description

      Jenkins 2.49,

      Pipeline 2.5

       

      After the initial setup of a PR build, subsequent builds will not refresh the PR title. So the PR title (env variable CHANGE_TITLE) is stuck to the initial value.
      CHANGE_TITLE
      CHANGE_TITLECHANGE_TITLE

        Attachments

          Activity

          Hide
          stephenconnolly Stephen Connolly added a comment -

          Please provide details of the SCM API related plugin versions that you are using.

          This should not be an issue if using the latest GitHub Branch Source plugin.

          Please re-open if you can reproduce this issue on the latest GitHub Branch Source plugin.

          If re-opening please providing details of the plugin versions of:

          • scm-api;
          • branch-api;
          • git-client;
          • git;
          • github-api;
          • github;
          • github-branch-source; and
          • workflow-multibranch
          Show
          stephenconnolly Stephen Connolly added a comment - Please provide details of the SCM API related plugin versions that you are using. This should not be an issue if using the latest GitHub Branch Source plugin. Please re-open if you can reproduce this issue on the latest GitHub Branch Source plugin. If re-opening please providing details of the plugin versions of: scm-api; branch-api; git-client; git; github-api; github; github-branch-source; and workflow-multibranch
          Hide
          boon Joe Harte added a comment -

          I am also seeing this problem. Steps to reproduce:

          1. Create a pull request with a Jenkinsfile that prints the PR title.
          2. Once the build has completed, change the PR title.
          3. Select "Rerun" on the Jenkins UI. Printed PR title does not reflect the change from step 2.

          Show
          boon Joe Harte added a comment - I am also seeing this problem. Steps to reproduce: 1. Create a pull request with a Jenkinsfile that prints the PR title. 2. Once the build has completed, change the PR title. 3. Select "Rerun" on the Jenkins UI. Printed PR title does not reflect the change from step 2.
          Hide
          boon Joe Harte added a comment - - edited

          Plugin versions:

          • scm-api - 2.2.6
          • branch-api - 2.0.18
          • git-client - 2.7.0
          • git - 3.7.0
          • github-api - 1.9.0
          • github - 1.27.0
          • github-branch-source - 2.3.2
          • workflow-multibranch - not listed under "Installed Plugins"
          Show
          boon Joe Harte added a comment - - edited Plugin versions: scm-api - 2.2.6 branch-api - 2.0.18 git-client - 2.7.0 git - 3.7.0 github-api - 1.9.0 github - 1.27.0 github-branch-source - 2.3.2 workflow-multibranch - not listed under "Installed Plugins"
          Hide
          boon Joe Harte added a comment -

          Stephen Connolly Can you verify if this should be resolved?

          Show
          boon Joe Harte added a comment - Stephen Connolly Can you verify if this should be resolved?
          Hide
          gordonshieh Gordon Shieh added a comment -

          I can vouch that this is happening with our Cloudbees Enterprise Jenkins too

          • scm-api - 2.3.0
          • branch-api 2.0.20
          • github-api 1.92
          • github-branch-source - 2.4.1

          We were trying to rollout some workflow changes to our developers, but this bug is now a blocker for us

          Show
          gordonshieh Gordon Shieh added a comment - I can vouch that this is happening with our Cloudbees Enterprise Jenkins too scm-api - 2.3.0 branch-api 2.0.20 github-api 1.92 github-branch-source - 2.4.1 We were trying to rollout some workflow changes to our developers, but this bug is now a blocker for us
          Hide
          gordonshieh Gordon Shieh added a comment -

          Joe Harte I've created a pull request that addresses this issue.
          https://github.com/jenkinsci/github-branch-source-plugin/pull/192

          we'll see how the review process goes, and if it makes it into master...

          Show
          gordonshieh Gordon Shieh added a comment - Joe Harte I've created a pull request that addresses this issue. https://github.com/jenkinsci/github-branch-source-plugin/pull/192 we'll see how the review process goes, and if it makes it into master...
          Hide
          allan_burdajewicz Allan BURDAJEWICZ added a comment -

          The "edited" action of PR events does not trigger a refresh of a [PR job metadata](https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.1.1/src/main/java/jenkins/branch/BranchNameContributor.java). However, those metadata would be refreshed by Branch Indexing since branch indexing observes PRs and [refreshes metadata](https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.4.1/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java#L2093-L2098) accordingly (even if a build is not to be triggered because there is no changes).

          Note: A workaround would be to use the GIT REST API to get information about the PR instead of relying on the `CHANGE_TITLE` variable.

          Show
          allan_burdajewicz Allan BURDAJEWICZ added a comment - The "edited" action of PR events does not trigger a refresh of a [PR job metadata] ( https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.1.1/src/main/java/jenkins/branch/BranchNameContributor.java ). However, those metadata would be refreshed by Branch Indexing since branch indexing observes PRs and [refreshes metadata] ( https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.4.1/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java#L2093-L2098 ) accordingly (even if a build is not to be triggered because there is no changes). Note: A workaround would be to use the GIT REST API to get information about the PR instead of relying on the `CHANGE_TITLE` variable.

            People

            • Assignee:
              Unassigned
              Reporter:
              stinospash stino spash
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: