How can I enforce a policy when developer create pull request or pushes a commit

Avi Falah September 14, 2020

We're using Bitbucket Cloud to develop a product and We'd like to trigger a validations  when a commit is pushed or pull request created and automatically reject those if a policy not met.

i.e. prevent some files from being accidentally removed by a developer.

 

 

1 answer

0 votes
Bloompeak Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 14, 2020

Hi @Avi Falah ,

You can do it by git hooks. Below see the Atlassian documentation for it. Hope it helps.

https://www.atlassian.com/git/tutorials/git-hooks

Avi Falah September 14, 2020

Hi

Thanks for the quick response.

Local hooks look like they require to deploy and ensure up to date hooks for all the developer environments in the team, I'd like to avoid that maintenance.

As far as I know server side hooks are not supported in Bitbucket Cloud.

So any other suggestions would be welcome.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events