Custom check to prevent merging PRs if specific files are in the commit

jv
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2024

Hi,

With the Custom merge checks, would it be possible to prevent merging PRs if specific files are in the commit?

The use case for us are compliance rules that require a special process to change some security and configuration related files.

 

Thanks in advance

1 comment

Comment

Log in or Sign up to comment
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2024

Hi @jv

yes - you could build a check that inspects the affected files of a PR (through interacting with the Bitbucket REST APIs), and decide to block a PR if those files are present. 

Hope this helps? 

Like # people like this
jv
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2024

Thanks @Jeroen De Raedt , it definitely helps.

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events