Skip to content

Protected branch restrictions ignored when merging from desktop app #3633

Closed

Description

@brianlovin

Description

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

  1. Create a branch that tracks an upstream protected branch
  2. From the GitHub desktop UI, push to origin
  3. 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.

Activity

  1. brianlovin commented on Dec 18, 2017

    @brianlovin
    Author
    1. Create test branch

    screenshot 2017-12-18 15 14 23

    1. Click push to origin

    screenshot 2017-12-18 15 14 37

    1. Branch is merged, bypassing restrictions

    screenshot 2017-12-18 15 14 54

  2. changed the title [-]Protected branches ignored when merging from desktop app[/-] [+]Protected branch restrictions ignored when merging from desktop app[/+] on Dec 18, 2017
  3. shiftkey commented on Dec 18, 2017

    @shiftkey
    Member

    @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? 🤔

  4. brianlovin commented on Dec 18, 2017

    @brianlovin
    Author

    @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 :)

  5. shiftkey commented on Dec 18, 2017

    @shiftkey
    Member

    @brianlovin yup, that totally makes sense 👍

  6. shiftkey commented on Dec 26, 2017

    @shiftkey
    Member

    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.

  7. shiftkey commented on Apr 15, 2018

    @shiftkey
    Member

    @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.

  8. billygriffin commented on Feb 11, 2019

    @billygriffin
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions