Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira integration: support multiple work item tickets per commit #259

Open
davidalpert opened this issue Nov 21, 2023 · 1 comment
Open

Comments

@davidalpert
Copy link

davidalpert commented Nov 21, 2023

Expected Behavior

Sometimes a single conventional commit can fix or resolve several work item tickets at once. In the case of Jira, for example, this might look like a commit message that includes multiple Jira issue keys:

fix: that annoying bug that's been reported by everyone

resolves: JIRA-1111, JIRA-1112, JIRA-1113
related-to: JIRA-1110

In this case, it would be useful to make all of the work items available to the template.

Actual Behavior

Only the first matching work item / Jira issue key is matched.

Steps to Reproduce (including precondition)

  • update ./testdata/gitlog_jira.txt so that a commit has more than one Jira key in it
    @@__CHGLOG__@@HASH:14ef0b6d386c5432af9292eab3c8314fa3001bc7	   14ef0b6d@@__CHGLOG_DELIMITER__@@AUTHOR:tsuyoshi wada	mail@example.com 1515153600@@__CHGLOG_DELIMITER__@@COMMITTER:tsuyoshi wada	mail@example.com 1515153600@@__CHGLOG_DELIMITER__@@SUBJECT:fix: Feature didn't work right@@__CHGLOG_DELIMITER__@@BODY:This is body message.
    
    Fixes JIRA-1112, JIRA-1113, JIRA-1114
    Relates-To JIRA-1110
    
  • all the unit tests still pass, the commit parser finds only 2 commits and populates the single .JiraIssueID with the first issue ID found but the additional IDs are not available on the parsed commit object.

Your Environment

  • OS: GOOS=darwin GOARCH=arm64
  • git-chglog version: v0.15.4-5-g8ec17f6
@davidalpert
Copy link
Author

this is a bit larger piece of work as it will either change the structure for referencing Jira tickets in existing templates or increase complexity to maintain backwards compatibility; as such I prefer to receive feedback on existing open pull requests to ensure that I am following appropriate style and this work is aligned with the purpose of this tool:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant