jenkinsci / atlassian-jira-software-cloud-plugin

Atlassian Jira Software Cloud Plugin
https://plugins.jenkins.io/atlassian-jira-software-cloud/
Apache License 2.0
43 stars 46 forks source link

Issue keys not extracted from commit message in the first pipeline run for branch #87

Open thombergs opened 2 years ago

thombergs commented 2 years ago

Jenkins and plugins versions report

In a Multibranch pipeline, when it runs the first time for a new branch, issue keys mentioned in the commit message are ignored.

In the pipeline logs I see this at the start:

Commit message: "DEN-2"
First time build. Skipping changelog.

Obviously, Jenkins has the latest commit message in hand, but it decides not to make it available to our ChangeLogIssueKeyExctractor.

What Operating System are you using (both controller, and any agents involved in the problem)?

not relevant

Reproduction steps

  1. configure Jenkins plugin with the URL and secret provided by the Jenkins for Jira app
  2. set up a Multibranch pipeline
  3. create a new branch (that does not have an issue key in the name)
  4. push a few commits to the branch that do contain valid issue keys in the commit message (the issues must exist in Jira)
  5. have Jenkins scan the Multibranch pipeline

Expected Results

  1. I would expect the issues in Jira to show the build and the commits they were mentioned in

Actual Results

  1. after the pipeline has run, the issues in Jira do not show the build or the commits

Anything else?

It works fine for pipeline run for a new branch after the first