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

I would linke to prevent some files of being merged on pull-request

Deleted user June 12, 2022

Is there some way that i could prevent some files in my repository of being merged on pull-reuqest?

 

i would like my bitbucket-pipelines.yml and other files to not being merged when someone do a pull-request in order to no braek my configuration on my pipeline.

is that possible???

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2022

Hello @[deleted] ,

Thank you for reaching out to Atlassian Community!

As for your question, I'm afraid that it's not possible to restrict the change of a file to be merged in a pull request. Specifically for the bitbucket-pipelines.yml we have already a feature request to implement the functionality of restricting who can change the file : 

I would encourage you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.

As an alternative, if you subscribe to the Premium Plan, you can enforce the merge checks of a Pull Request to be completed before the user can do the merge. This way you could create a Branch Permission for the destination branch that only allows merge for pull request that has at least 1 approval from the default reviewers. You can then add yourself as a default reviewer and whenever you review a pull request that has changed the set of files you don't want to be changed, you can deny/request changes to that pull request for its creator. Please note that this approach requires a person to review the pull request and decide if it's approved or not.

More details about branch permissions are outlined in the following documentation: 

Hope that helps! Let me know if you have any questions.

Thank you, @[deleted] .

Kind regards,

Patrik S

Deleted user June 14, 2022

hI Patrik S.

 

I think this helped me a lot. i'll add my vote.

 

thanks

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events