Skip to content

Support pulling the git-notes for reviews from an untrusted repository. #71

Open
@ojarjur

Description

@ojarjur

This is meant for situations where an outside contributor requests a pull from their repository to an upstream repository.

In that scenario, the outside contributor can pull reviews from the upstream repository, and can push their review metadata to their repository. However, the maintainers of the upstream repository probably do not want to pull review metadata for all reviews from that outside contributor's repository, but do want to pull review metadata for that one request.

I imagine a scenario like the following:

  1. A repository (that we'll call upstream) is hosted somewhere.
  2. Outside contributor creates their own fork of that repository (that we'll call fork).
  3. Outside contributor makes some changes in their fork.
  4. The contributor requests a pull (either via git request-pull or something like a GitHub pull request) from their fork into the upstream repository.
  5. The maintainers of the upstream repository fetch the changes from the fork into a branch and create a review request to merge that branch into the master branch.
  6. The maintainers add some comments to the review.
  7. The outside contributor runs git appraise pull <upstream> to fetch the review request and comments from the upstream repository. They then respond to the comments and run git appraise push <fork> to push their comments to their fork.
  8. The upstream maintainers run something like git appraise pull --only-comments <review> <fork> to pull just the comments for that review from the fork, and then they run git appraise push <upstream> to push the combined review metadata to the upstream repository.
  9. Repeat steps 6-8 until the maintainers are happy with the review and submit it.

Since the upstream only really cares about the comments from the contributor (the review requests will be different because the review refs will be different, and the maintainers may want to abandon the review), I'm thinking this can all be supported by adding a flag to the git appraise pull subcommand that tells it to only pull the notes from the refs/notes/devtools/discuss ref, and to only merge in the notes for a specified review.

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