-
Bug
-
Resolution: Unresolved
-
Major
-
None
The class AbstractParsingIssueStrategy uses:
ChangeLogSet changeSets = build.getChangeSet();
The class that represents the ChangeLogSet is:
ChangeLogSet class: class hudson.plugins.git.GitChangeSetList
which is output in the build.
In the GitChangeSet class getMsg returns the title or the first line of the commit
@Exported public String getMsg() { return this.title; }
Which is what is used in MentionedInCommitStrategy:
@Override public List<JiraCommit> getJiraIssuesFromChangeSet(final ChangeLogSet.Entry change) { final List<JiraCommit> result = new ArrayList<>(); final List<String> foundTickets = new ArrayList<>(); for (String validJiraPrefix : Config.getGlobalConfig().getJiraTickets()) { String msg = change.getMsg(); ...
The problem is our git commit standards specify having the JIRA at the end, for example:
Upgraded Docker Image See JAS-1234
so what is getting passed is the first line, and the mentionedInCommitStrategy does not pick up any JIRA.
Perhaps if the ChangeLogSet.Entry class in jenkins cored exposed getComment this could be used instead in mentionedInCommitStrategy.
- relates to
-
JENKINS-49202 ChangeLogSet.Entry does not expose getComment to get entire commit message
- In Review