Missed Team ’24? Catch up on announcements here.

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

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 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
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? 

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