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

Failure when merging branch with many commits addressing multiple Jira tickets #37

Open
rafalotufo opened this issue Oct 16, 2023 · 4 comments · May be fixed by #39
Open

Failure when merging branch with many commits addressing multiple Jira tickets #37

rafalotufo opened this issue Oct 16, 2023 · 4 comments · May be fixed by #39

Comments

@rafalotufo
Copy link

rafalotufo commented Oct 16, 2023

The orb uses git show -s --format='%s' \"${JIRA_DEBUG_TEST_COMMIT:-$CIRCLE_SHA1}\") to find the jira tickets related to a deployment. This fails when the last commit is a merge, since the commit title is something like "Merge pull request #734 from [branch-name]" and does not contain the list of Jira tickets included in the merge.

It seems that a simple solution to this issue is to change the git show command to something like git show -s --format='%s' \"${CIRCLE_SHA1^..$CIRCLE_SHA1}\"). This will include all of the commits included in the merge.

Thank you for addressing this issue.

@mattrabe
Copy link
Contributor

I can confirm that the following works:

COMMIT_MESSAGE=$(git show -s --format='%s' "${CIRCLE_SHA1}^..${CIRCLE_SHA1}")

Will open a PR tomorrow, along with a temp orb.

@rafalotufo
Copy link
Author

Awesome, thanks for working on this. It's going to make this orb so much more useful!

@mattrabe mattrabe linked a pull request Oct 20, 2023 that will close this issue
@mattrabe
Copy link
Contributor

PR opened. In the meantime, I have published a fork that includes this change - fpcs/[email protected]: https://circleci.com/developer/orbs/orb/fpcs/jira

It is forked off the v2.0.2, so does not include the changes in v2.1.0

@mattrabe
Copy link
Contributor

mattrabe commented Nov 6, 2023

I have published v2.1.1 of my fork, which includes all of v2.1.0, plus the fix for this ticket: https://circleci.com/developer/orbs/orb/fpcs/jira

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

Successfully merging a pull request may close this issue.

2 participants