The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
How do I verify if a commit is a merge commit of a pull request using groovy scriptrunner for bitbucket server?
You just need to check the length of the `parents`. If there are two or more commits, it's a merge commit, otherwise it's a regular commit.
```commit.getParents().size() >= 2```
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still have a question?
Get fast answers from people who know.