Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Allowing reviewers to directly modify pull requests #7242

Closed

Description

@jeremyn

When I review a pull request, I often find some problems with it. There is friction for me to write these problems up, send it to the submitter, wait for them to make updates, re-review, and maybe do this a multiple times. It would be much faster if I could simply make the changes myself.

There is a new thing in GitHub where a pull request submitter can toggle a flag allowing maintainers to directly update the pull request branch: https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/ .

My question is whether we want to encourage our high volume contributors to toggle this flag for us to make these changes.

We could process pull requests much faster, but there are at least two problems with this:

  • If a contributor makes a change, and then I edit it and merge it myself, then I'm merging my own commit, which we don't like to do.
  • We would have multiple contributors on a single pull request. I asked about this in the squash-and-merge discussion, and @Hainish said that's an edge case, but if we started doing this then it would not be an edge case.

@fuglede @Hainish @J0WI Thoughts? Also @galeksandrp @ivysrono @gloomy-ghost as some of our current high volume contributors.

Activity

  1. gloomy-ghost commented on Sep 30, 2016

    @gloomy-ghost
    Collaborator

    This problem is a sort of subtle, and I am sorry if I am too stubborn at some points.

    I did toggle the flag before, but not anymore now. A righteous reason for this is about reviewers are also humans, they also make mistakes and there will be some arguments on modifying PRs. However this is not my contention because it's the only thing that QA need worry.

    To be honest, my real point is about motivation. I don't exactly know why I've pushed hundreds of commits, and I am just following some kind of pleasure. Moreover, in some Chinese programmer communities, they jokingly call GitHub as 'The world's largest gay dating website'. It is absurd but sometimes true.

    I am a volunteer, and some reviewers are volunteer as well. For me, I want the reviewing be equal. It should be likely a reviewing with co-workers, not with a CTO. I do know the discussion on reviewing are sort of wasting time, waiting of modification and re-reviewing are annoying for reviewers. However, when the review become a hierarchy essentially, why don't I just leave things in a issue and wait someone else to do them?

  2. jeremyn commented on Sep 30, 2016

    @jeremyn
    ContributorAuthor

    I'm a volunteer too. I'm just some random person on GitHub who sent EFF an email asking if I could help, then I was made a reviewer, and now I happen to have available time and energy to put toward this.

    To compare HTTPS Everywhere with other projects:

    Repository Commits Open/closed issues Open/closed PRs
    mitchellh/vagrant 9,200 400/5,450 50/1,950
    atom/atom 8,500 1,750/8,100 100/2,800
    tensorflow/tensorflow 30,100 550/2,450 23/1,650
    EFF/https-everywhere 56,650 400/1,150 650/5,050

    HTTPS Everywhere has an issue/PR load comparable to major corporate projects, but in our case -- and I'm only guessing here, I'm not part of EFF so I don't for sure, someone please correct me if I'm wrong -- we only have about three active volunteer part-time reviewers and a very small number of paid people who are also responsible for other EFF things. Of course HTTPS Everywhere PRs are probably individually easier than, say, TensorFlow PRs, so it's not a perfect comparison.

    Also note that according to Github's Pulse, we get maybe 3-10 new PRs a day, and recently I think we were up to around 900 open PRs.

    Most PRs have boring problems like some domains are missing or not sorted properly. Also if a PR is old, the site might have changed and the PR needs updating through no "fault" of the contributor. One of our contributors, @galeksandrp , has about 250 open PRs some of which date back to June. I really don't want to have 250 discussions with @galeksandrp on boring PR problems, some of which @galeksandrp has waited for over three months to hear back on. It is discouraging and a burden for me, and I assume for them too. And only rarely do I get pushback on reviews and sometimes that pushback is boring, like getting different results between me and the contributor on some particular URL. Technical discussions where I learn something or there is some policy question like in @gloomy-ghost 's PRs #6899 , #6996 , or the recent HSTS preload deletions are the exception (although they may not seem like that to @gloomy-ghost ).

    Another contributor, @luixxiul , recently deleted their fork and we're going to lose about 200 open PRs because of it, which is bad for us. I don't know why they deleted their fork, and deleting it is entirely their right, but maybe the long wait to review had something to do with it.

    I don't want to be a boss or CTO over anyone. This is volunteer work for me and I want it to be efficient and not boring. Having endless back-and-forth discussions about missing domains or sorting is boring and, I'm arguing here, inefficient.

  3. jeremyn commented on Sep 30, 2016

    @jeremyn
    ContributorAuthor

    Issue #6863 is a related discussion where we talk about how detailed the review process should be, which is also an effort to save time.

  4. jeremyn commented on Sep 30, 2016

    @jeremyn
    ContributorAuthor

    Pinging @cooperq , @jsha , and @loveithateit so they're aware of this discussion as well.

  5. ivysrono commented on Oct 1, 2016

    @ivysrono
    Contributor

    I am a law student, my IT level is poor, and I have learned a lot here, thank you very much spent a lot of time on me, so I have made great progress.
    But I feel tired and tired either, especially my submission of PRs delay in response. Or I modified, you have disappeared. #6889 #6894
    I personally agree with you to directly modify and merge, if this helps the project progress, but only on my own.

  6. J0WI commented on Oct 1, 2016

    @J0WI
    Contributor

    A reviewer should never merge his own changes, so we would need at least two reviewers.
    It would be easier to resolve PR's that are open for a long time with no response from the contributor. Currently you have to pull the changes from their repo manually and open a new PR then.

  7. jeremyn commented on Oct 3, 2016

    @jeremyn
    ContributorAuthor

    @ivysrono I responded in #6889 (comment) for Tencent_CN.xml but I want to answer this here:

    But I feel tired and tired either, especially my submission of PRs delay in response. Or I modified, you have disappeared.

    I can only speak for myself here, not the other reviewers. If I ask you to do some work on a PR and I assign the PR to myself, that means I'm giving you some assurance -- but not a firm promise -- that I will eventually review your changes and work with you until the PR is merged or closed. If I comment on a PR but don't assign it to myself, then I'm just making a comment and you shouldn't assume I'm going to review your work in more detail or even answer questions. Again, this is just my own, current approach. I'm not speaking for any other reviewer and this might change at any time.

  8. ivysrono commented on Oct 3, 2016

    @ivysrono
    Contributor

    @jeremyn I have commented in #6889 (comment)

  9. Hainish commented on Oct 12, 2016

    @Hainish
    Member

    My opinion is to strongly agree with @J0WI that a reviewer should never merge their own changes, and that if a PR from a ruleset contributor requires a change (which it will more often than not I'm sure) and "Allowing changes to a pull request branch created from a fork" is not enabled, it's okay to use the following method:

    git checkout -b somecontributor-some-pull-request master
    git pull https://github.com/somecontributor/https-everywhere.git some-pull-request

    make your own changes, and open a new pull request. Another maintainer should then review the PR. This would resolve the case where the contributor is unavailable for some amount of time. You may want to avoid this with new contributors, though, since it's not a common workflow and can seem like a breach in normal pull request protocols and could be upsetting to a maintainer.

    The reason for a maintainer not merging their own contributions without review is for a few reasons. Firstly, everyone makes mistakes and it's important to have at least two sets of eyes on any change. Secondly, it's important for security. A ruleset maintainer who unilaterally makes changes and pulls their own code can introduce subtle ruleset changes that may compromise the security of the addon. Since we're included in Tor Browser, it's not out of the question that a lot of time and investment might be spent to have malicious rulesets compromise the security of the Tor Browser. Having a review process in place is not a guarantee that this will never happen, but it does establish a protocol by which it would be easier to detect and harder to pull off.

  10. Hainish commented on Oct 12, 2016

    @Hainish
    Member

    I also think it's okay to encourage active contributors to check the "Allowing changes to a pull request branch created from a fork" and make extra commits on top of an existing PR, as long as there is a separate reviewer for your changes. But this by no means should be a requirement

  11. jeremyn commented on Oct 12, 2016

    @jeremyn
    ContributorAuthor

    I agree that having a second reviewer is good way to check for mistakes, including accidentally introducing security problems. It's also a good way to check that the reviewers are doing things consistently among themselves.

    It is not a good guard against a malicious reviewer though. I can submit a new PR with a dummy GitHub account, or have one of my partners-in-crime do it under their established account, and then use this primary account to approve it. I've also occasionally asked contributors to simply replace one block of text in a ruleset with another block that I provide, or even the entire thing, if that block of text has so many problems that it's easier to just give them the correct text than to explain each problem. Maybe I can manipulate some novice contributor into doing something bad.

    Forking a contributor's branch and adding our own stuff to it is a big step for various reasons. I would not be comfortable doing that without their explicit permission, and if they were okay with that then they would have already checked the Allow edits from maintainers option. I might do it if someone submitted a high priority PR, then simply disappeared and wouldn't respond to multiple attempts to reach them. Even then I would be more comfortable if we documented ahead of time that we reserve the right to take over a PR in this way.

    Requiring a second reviewer negates most of the benefits of doing this. The desired gain is that we can "power through" and close hundreds of PRs in a short period of time, and we avoid tedious discussions and checklists to fix minor problems. If we have to wait for a second reviewer, then we might as well just work with the contributor like we've been doing already.

  12. Hainish commented on Oct 12, 2016

    @Hainish
    Member

    It is not a good guard against a malicious reviewer though. I can submit a new PR with a dummy GitHub account, or have one of my partners-in-crime do it under their established account, and then use this primary account to approve it. I've also occasionally asked contributors to simply replace one block of text in a ruleset with another block that I provide, or even the entire thing, if that block of text has so many problems that it's easier to just give them the correct text than to explain each problem. Maybe I can manipulate some novice contributor into doing something bad.

    Point taken. There are numerous scenarios where the review process fails. Currently I doubt that if a maintainer pulled their own commit it would even be necessarily caught by others. Coming up with scenarios where it fails is easy, and we have to have faith in the good intentions of ruleset maintainers.

    Requiring a second reviewer negates most of the benefits of doing this. The desired gain is that we can "power through" and close hundreds of PRs in a short period of time, and we avoid tedious discussions and checklists to fix minor problems. If we have to wait for a second reviewer, then we might as well just work with the contributor like we've been doing already.

    I can envision a scenario where two ruleset maintainers who are both active can organically pass PRs to one another. That seems to me just a matter of cultivating a relationship with the other reviewers where it's easy to pass on PRs and have them reviewed in a timely manner.

  13. galeksandrp commented on Nov 15, 2016

    @galeksandrp
    Contributor

    Since GitHub enables "Allow edits from maintainers" on new PR by default, I enabled it on all my open PRs.

  14. jeremyn commented on Nov 15, 2016

    @jeremyn
    ContributorAuthor

    Thanks @galeksandrp .

  15. jeremyn commented on Nov 21, 2016

    @jeremyn
    ContributorAuthor

    This issue has been open long enough and there's no active discussion, so I'm closing it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions