Skip to content

Update the delete branch error message for Protected branches #138

Closed

Description

@tierninho

Attempting to delete a protected branch is blocked as expected. Perhaps we could make the error message a little more readable?

31897897-fb5c6192-b817-11e7-89a3-157e22627e10

repro:

  • make one of your dotcom branches protected (via settings)
  • try deleting it on Desktop

tested in v1.0.5beta0, mac

Logs in console:

install.ts:31 Executing checkRemoteBranchExistence: git -c credential.helper= ls-remote --heads origin dupe (took 1.363s)
install.ts:31 Executing deleteRemoteBranch: git -c credential.helper= push origin :dupe (took 2.324s)
install.ts:23 `git -c credential.helper= push origin :dupe` exited with an unexpected code: 1.
remote: error: GH006: Protected branch update failed for refs/heads/dupe.        
remote: error: Cannot delete a protected branch        
To https://github.com/tierninho-tester/trterdgdfgdf.git
 ! [remote rejected] dupe (protected branch hook declined)
error: failed to push some refs to 'https://github.com/tierninho-tester/trterdgdfgdf.git'
error @ install.ts:23
t.git @ core.ts:175```

Activity

  1. self-assigned this
    on Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions