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

provide issue IDs associated with a Pull Request

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently the bitbucket branch source plugin provides the following environment variables:

      "BRANCH_NAME"
      "CHANGE_ID"
      "CHANGE_TARGET"
      "CHANGE_BRANCH"
      "CHANGE_FORK"
      "CHANGE_URL"
      "CHANGE_TITLE"
      "CHANGE_AUTHOR"
      "CHANGE_AUTHOR_DISPLAY_NAME"
      "CHANGE_AUTHOR_EMAIL"
      "TAG_NAME"
      "TAG_TIMESTAMP"
      "TAG_UNIXTIME"
      "TAG_DATE"

      It would be very useful if this was extended to provide any issue IDs associated with a Pull Request ("CHANGE_" in the above semantics).

      BitBucket Server provides a REST API to get issue IDs associated with a PR:

      /rest/jira/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues
      

      https://docs.atlassian.com/bitbucket-server/rest/5.3.0/bitbucket-jira-rest.html

      Perhaps this could be exposed by the plugins EnvironmentContributor extension as something like "CHANGE_ISSUES" ?

      This would allow for use of the various Jira plugin steps to do things like update Jira tickets with information from a pipeline build of a pull request.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            nickbrown Nicholas Brown
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: