Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Check if a commit is a merge commit - Bitbucket scriptrunner

Narasimha Velagaleti November 28, 2018

How do I verify if a commit is a merge commit of a pull request using groovy scriptrunner for bitbucket server?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
majensen January 28, 2020

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```

TAGS
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events