Forums

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

How to bypass PR review requirements when only specific files (e.g., */config.json) are modified?

Kavindu Kalinga
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!
January 7, 2026

I have a repository where branch protection rules are enabled, requiring at least one pull-request review before merging.

However, I want to introduce an exception to this rule:

  • If a pull request only modifies files named config.json located anywhere in the repository (for example, service-a/config.json, env/prod/config.json, etc.)

  • Then the PR should not require manual review

  • Ideally, the PR should be auto-approved or allowed to merge without review

What I’m looking for:

  • A way to conditionally bypass branch protection rules based on changed file paths

  • Or an approach to automatically approve PRs when only */config.json files are changed

Constraints / Context:

  • Branch restrictions are already enforced (1 review required)

  • The solution should be automated (Bitbucket Pipelines, etc.)

  • Preferably without weakening security for other file changes

1 answer

0 votes
Saxea _Flowie_
Atlassian Partner
January 7, 2026

Hi @Kavindu Kalinga ,

I’m afraid you can’t do it using only Bitbucket’s built-in checks, but you could build your own custom check and implement your logic above.

Alternatively, if you prefer an out of the box solution, we provide a Bitbucket app Flowie, which allow you to configure checks using conditions

In your case, the relevant bit of the config, would look something like this: 

 minimumApprovals(
[changeset.allMatches("**/config.json"), 0],
[otherwise, 1]
)

Hope this helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events