Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,630
Community Members
 
Community Events
176
Community Groups

Is it possible to enforce merge checks for an approval from a member from each team?

First of all, does bitbucket support teams?

We have a component library that several teams are working on. It would be a 'nice to have' feature if we could enforce a merge check to ensure that at least one member from each team has approved a PR.

Is this possible at the moment in Bitbucket? I know Jira has teams, but I haven't seen support for this in Bitbucket.

Thanks for any help in advance!

2 answers

1 accepted

1 vote
Answer accepted

Hi @Adam Piper ,

welcome to the Atlassian community!

You could put in place that behaviour using builtin features.

  1. Setup default reviewers per project basis as specified here https://support.atlassian.com/bitbucket-cloud/docs/add-default-reviewers-to-a-project/
  2. Define merge check policies and in particular "Check for at least # approvals" as specified here https://bitbucket.org/blog/protect-your-master-branch-with-merge-checks#:~:text=In%20Bitbucket%20Cloud%2C%20merge%20checks,on%20Free%20or%20Standard%20plans.&text=Users%20get%20notified%20when%20pull,have%20that%20number%20of%20approvals.&text=Users%20get%20notified%20when%20they%20have%20open%20pull%20request%20tasks.&text=Users%20get%20notified%20when%20they%20don't%20have%20that%20number,for%20the%20most%20recent%20commit.

Does it meet your requirments? Currently teams, if managed as user groups, can be reused at bitbucket level for dfault reviewers configuration.

Moreover, if you need to check merge approvals in a structured way, my suggestion is to try the following app https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?hosting=cloud&tab=overview

Hope this helps,

Fabio

Hi Fabio,

Thanks a lot for your welcome, and for your answer.

I suppose I was looking for something more along the lines of we have our default reviewers, and then on top of that we have a merge check for someone from each team. However, the users on each team are not necessarily default reviewers.

This way it would allow us to keep a strict list of repository maintainers that may be fewer than the number of teams working on the repository.

If this is not possible then I think your solution is probably the best we could get. We will just have to select someone from each team to be a default reviewer.

The idea behind this is that we will only allow default reviewers to merge into the main branch, but need the approval of someone from each team before the merge can actually take place.

The app that you have provided does look like it could fulfil our needs, so I may give that a go!

Thanks again,

Adam

you're welcome @Adam Piper 

Hello

You also can achieve something like this with Code Owner for Bitbucket.

You define your teams in the Code Owners file. And then enforce that each team needs at least one approval:

```

# Team definitions
@@@UITeam @"Jim Dev" @"Jill Dev"
@@@BackendTeam @"Coffee Joe" @"Jim Dev" @"Jordan Dev"
@@@ToolsTeam @"Joe Dev" @"Lee Dev"
@@@SecurityTeam @"Alice" @"Bob"

# What source code is owned by who:
src/** @@UITeam @@BackendTeam @@ToolsTeam @@SecurityTeam

# At least one developer of each team has to approve
(Check(@@UITeam>=1) & Check(@@BackendTeam>=1) & Check(@@ToolsTeam>=1) & Check(@@SecurityTeam>=1)& Check(@@SecurityTeam>=1))```

 

More details in the docs.

Cheers
Roman

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events