You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Protected branch restrictions ignored when merging from desktop app #3633
I am able to merge code directly into master from the desktop tool, despite master being a protected branch in our repo that requires both a code review and passing ci tests.
Version
GitHub Desktop version: 1.0.11 OS version: MacOS
Steps to Reproduce
Create a branch that tracks an upstream protected branch
From the GitHub desktop UI, push to origin
Branch bypasses protections and merges into upstream branch
Expected behavior: Fail, or warn about protected branch restrictions
Actual behavior: Merges branch automatically into protected upstream branch
Reproduces how often: 100%
Logs
NA
Additional Information
I have admin permissions in the repo, however in the website UI I am forced to opt-in to override branch protections in order by bypass them with privilege. From the desktop application, I am not warned or restricted from merging into protected branches, regardless of CI states or reviewer status.
changed the title [-]Protected branches ignored when merging from desktop app[/-][+]Protected branch restrictions ignored when merging from desktop app[/+]on Dec 18, 2017
We don't currently track branch protections in the app - we could get this from the GitHub API - so we won't stop you from doing the merge locally. But I'm curious why the server doesn't reject the push either - could this be related to you being an admin of the repository? 🤔
@shiftkey yup, most likely because I'm an admin of the repo I was able to bypass it. So I suppose this issue is less of a bug and more of a UI/feature request to respect branch protections in-app. Hope that helps :)
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I added the future-proposal label to this issue and closed it so that we won't get overwhelmed with our backlog! We will revisit this in our next planning session.
@workobots reported in #4444 that even committing to master may be covered by branch protections, and while pushes are blocked this is a chance for the app to catch and warn users at commit time and guide them to the ideal workflow.
Thanks @brianlovin! Sorry for the delay in dealing with this - we're super interested in branch protections more generally and doing some research on how it's used in various orgs so we can figure out a broader solution here. We'll be tracking that work in #1021 so I'm going to remove future-proposal here. Thanks again!
Activity
brianlovin commentedon Dec 18, 2017
[-]Protected branches ignored when merging from desktop app[/-][+]Protected branch restrictions ignored when merging from desktop app[/+]shiftkey commentedon Dec 18, 2017
@brianlovin thanks for the details.
We don't currently track branch protections in the app - we could get this from the GitHub API - so we won't stop you from doing the merge locally. But I'm curious why the server doesn't reject the push either - could this be related to you being an admin of the repository? 🤔
brianlovin commentedon Dec 18, 2017
@shiftkey yup, most likely because I'm an admin of the repo I was able to bypass it. So I suppose this issue is less of a bug and more of a UI/feature request to respect branch protections in-app. Hope that helps :)
shiftkey commentedon Dec 18, 2017
@brianlovin yup, that totally makes sense 👍
shiftkey commentedon Dec 26, 2017
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I added the
future-proposallabel to this issue and closed it so that we won't get overwhelmed with our backlog! We will revisit this in our next planning session.shiftkey commentedon Apr 15, 2018
@workobots reported in #4444 that even committing to
mastermay be covered by branch protections, and while pushes are blocked this is a chance for the app to catch and warn users at commit time and guide them to the ideal workflow.billygriffin commentedon Feb 11, 2019
Thanks @brianlovin! Sorry for the delay in dealing with this - we're super interested in branch protections more generally and doing some research on how it's used in various orgs so we can figure out a broader solution here. We'll be tracking that work in #1021 so I'm going to remove
future-proposalhere. Thanks again!