I am setting up some automation rules to capture {{commit.hash}} for every commit created using the 'When Commit Created' trigger. The rules does get triggered when I make a commit to my dev branch (b458626). After merging to the 'main' branch, this merge commit does NOT trigger the rule (a1ed54d). Is the rule making a distinction between a commit and a merge commit?
Are you merging it "manually" or with a pull request?
Because, for pull request merges, there is another trigger type: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Pull-request-merged
Hi Aron, this is for manual merges without issuing a pull request. I was hoping the automation rule would trigger on all commits and just filter using {{isMergeCommit}} smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I checked out their docs, and they don't mention if they differentiate between "regular" and "merge" commits, so I would assume the same like you did. But, it seems it is not how it is... :-/
Funnily, we develop the DevOps Automation app for self-hosted Jira, and our Commit Created trigger works as you wrote: we provide a {{devops.commit.isMerge}} smart value which you can use to filter merge commits:
You confirmed that it is an intuitive design. :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I get the commit hash for a merge commit
If I use Pull Request Merge, I am not getting the {{commit.hash}} value in it (as it gets set only on commit created trigger
If I use commit created trigger, then it is not getting fired for a merge commit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.