Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,047
Community Members
 
Community Events
165
Community Groups

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

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 Jun 14, 2022

Hello @Joao Moyses Moura Alves ,

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, @Joao Moyses Moura Alves .

Kind regards,

Patrik S

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
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,175 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you