Skip to content

Better experience around protected branches and pr permissions #4482

Closed

Description

@iAmWillShepherd

We should provide a friendlier experience when collaborating with others on a single repository

2018-04-19_23-42-51 994

The reason why this failed is in the error message, but it's not presented in a user friendly way. In the case of ☝️, the publish button should have been disabled. We can get these permissions from the repositories endpoint, so it should be possible to prevent this state from occuring.

tl;dr

  1. Desktop should preempt this
  2. It's possible to push to a protected branch
  3. Scary error messages

Interestingly, this repo requires signed commits and I did not sign the commits made by my evil-handle, yet that was not the reason why the push failed. Shouldn't unsigned commits take precedence?

Reproduction steps

Assume steps not listed explicitly are things not to do (where it makes sense 🤷‍♂️)

Main handle - performed on dotcom

  • Create a repo
  • Protect master
    • Require pr reviews
    • Require signed commits
  • Add a @iAmNotWillShepherd as collaborator

Evil handle - performed in desktop

Noticed that git information didn't automatically update as I was documenting ☝️ (is this a bug?)

  • Clone the repo
  • Make some commits to master
  • Push

Separate maintainers problem

This is a related issue

Maintainers should be able to push to their contributors' PRs since we can get this info from the maintainer_can_modify property returned from the pull requests endpoint. If we store this data, desktop could allow this.

Activity

  1. added this to the milestone on Apr 20, 2018
  2. shiftkey commented on Apr 20, 2018

    @shiftkey
    Member

    Maintainers should be able to push to their contributors' PRs since we can get this info from the maintainer_can_modify property returned from the pull requests endpoint. If we store this data, desktop could allow this.

    I think Desktop also needs to track the permissions hash for the repository from the API along with this field. From the docs, it's constrained to everyone with push permissions:

    For greater collaboration, you can allow commits on branches you've created from forks. Permission to commit to your forked branches is limited to those with push access to the upstream repository of the fork.

  3. removed this from the 1.3.0 milestone on Jul 11, 2018
  4. niik commented on Aug 28, 2020

    @niik
    Member

    This has largely been covered by #8889 and #7826. Going to consider it closed

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