You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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???
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 .