tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

git.md (4291B)


Working with Pull Requests as a reviewer

In order to do a thorough review, it is sometimes desirable to have a local copy of the tests one wishes to review.

Reviewing tests also often results in wanting a few things to be changed. Generally, the reviewer should ask the author to make the desired changes. However, sometimes the original author does not respond to the requests, or the changes are so trivial (e.g. fixing a typo) that bothering the original author seems like a waste of time.

Here is how to do all that.

Trivial cases

If it is possible to review the tests without a local copy, but the reviewer still wants to make some simple tweaks to the tests before merging, it is possible to do so via the Github web UI.

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  2. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  3. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  4. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  5. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  6. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

_Note: If the PR predates the introduction of this feature by Github, or if the author of the PR has disabled write-access by reviewers to the PR branch, this may not be available, and your only option would be to commit to a new branch, creating a new PR._

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

The Normal Way

This is how to import the Pull Request's branch into your existing local checkout of the repository. If you don't have one, go [fork][fork], [clone][clone], and [configure][configure] it.

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  2. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  3. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  4. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

_The relevant <author-id>, <repo-name>, and <name-of-the-PR-branch> can be found by looking for this sentence in on the Github page of the PR:

Add more commits by pushing to the name-of-the-PR-branch branch on author-id/repo-name.

_

If all you meant to do was reviewing files locally, you're all set. If you wish to make changes to the PR branch:

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  2. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

_Note: If the PR predates the introduction of this feature by Github, or if the author of the PR has disabled write-access by reviewers to the PR branch, this will not work, and you will need to use the alternative described below._

If, instead of modifying the existing PR, you wish to make a new one based on it:

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

1. Create a new branch from the tip of the PR: git branch <your-new-branch> <name-of-the-PR-branch> && git checkout <your-new-branch> 2. Create a new branch from master and merge the PR into it: git branch <your-new-branch> master && git checkout <your-new-branch> && git merge <name-of-the-PR-branch>

  1. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  2. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.
  3. assign@noreply.github.com when you are added as the assignee (i.e. as the reviewer) on a pull request.

Note: You should also close the original pull request.

When you're done reviewing or making changes, you can delete the branch: git branch -d <name-of-the-PR-branch> (use -D instead of -d to delete a branch that has not been merged into master yet).

If you do not expect work with more PRs from the same author, you may also discard your connection to their repo: git remote remove <author-id>

[clone]: ../writing-tests/github-intro.html#clone [commit]: ../writing-tests/github-intro.html#commit [configure]: ../writing-tests/github-intro.html#configure-remote-upstream [fork]: ../writing-tests/github-intro.html#fork-the-test-repository [submit]: ../writing-tests/github-intro.html#submit