Skip to content

Properly parse protected branch push rejections #858

Closed

Description

@joshaber

(Ideally this issues would be filed on https://github.com/desktop/git-kitchen-sink since that's where the error parsing logic lives, but I'm afraid it'll get forgotten over there.)

We should parse protected branch push rejections into a nicer error message.

Example message we get from git:

remote: error: GH006: Protected branch update failed for refs/heads/master.        
remote: error: At least one approved review is required        
To https://github.com/desktop/desktop.git
 ! [remote rejected]   master -> master (protected branch hook declined)
error: failed to push some refs to 'https://github.com/desktop/desktop.git'

Activity

  1. shiftkey commented on Mar 22, 2017

    @shiftkey
    Member

    Oops, looks like I did this specific issue already in #1036, and started crafting up a list of these known cases in #1023. Want to keep this open?

  2. joshaber commented on Mar 23, 2017

    @joshaber
    ContributorAuthor

    Nope, those issues look good 👍

  3. locked as resolved and limited conversation to collaborators on Jul 23, 2018
  4. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions