Protect branch with include administrator but not all admins (Maven release issue)

Hi 

We want to enable protect branch and include administrators, so everyone has to go through a merge. 

However, we use maven release plugin, which does a direct push to the master branch, so is there anyway we can have a user that’s excempt from the “include admin” rule? 

1 Like

I don’t believe you can.

I don’t know how Maven works but does Maven want to push towards the branch that is named  master or towards the  main branch? Because these are two different things. If it pushes towards a branch named  master you can just make another branch like “main”, make that the  default branch and protect it. Then Maven can push to the (unprotected)  master branch, and you can merge that into the protected  main branch.

The main branch, but we kinda want that, as one of the main thing the plugin does it up your version number and remove snashots versioning from the pom. If we put it in a seperate branch, itll mean for every release, we’ll need a pr to merge the pom with the updated version number

I have exactly the same problem: my continuous delivery build pushes to the git branch that is being built from.

The problem with the current protected branch implementation is that it overloads the ‘admin’ permission.  In my case, I want people to be able to do things an admin would do EXCEPT override branch protections.

One idea to solve this is to allow a list of users which can bypass the branch protection.  This way, i can allow my build automation to bypass branch protection (which is fine since this is tested automation – not subject to human error) while still ensuring that human users can not get around the protections (accidentially or otherwise).