Read Anthropic’s case study about Graphite Reviewer

Sharing and referencing pull request links in GitHub

Sara Verdi
Sara Verdi
Graphite software engineer
Try Graphite

Pull requests allow teams to discuss changes before integrating them into the main branch. Efficiently sharing and referencing pull request (PR) links within GitHub can organize the review process and improve communications among team members. This guide will explore how to share PR links, reference them in comments, and utilize Graphite's PR inbox for better PR management.

Every pull request in GitHub is assigned a unique URL, which can be used to share the PR with teammates or reference it in documentation. Here’s how you can obtain this link:

  1. Navigate to the pull request in your GitHub repository.
  2. At the top of the pull request page, by the title of the PR, you can click the clipboard icon to generate the pull request link.

screenshot of clipboard

Anyone with access to the repository you're working in will be able to see use this link to view the PR.

To provide precise feedback or reference, you can link directly to a specific file or line within a pull request:

  1. Open the file within the pull request.
  2. Click on the line number to highlight it.
  3. Right-click the highlighted line and select "Copy permalink".
  4. Paste this link in your GitHub comment or anywhere you need to reference it.

Example of referencing a file in a pull request comment:

Terminal
See the changes proposed in this file [here](https://github.com/username/repository/pull/1/files#diff-abc123).

You can reference other pull requests in your comments by using the hashtag (#) followed by the PR number:

Terminal
Relates to #2

This creates a link to the mentioned pull request to easily cross-reference within projects.

Graphite’s PR inbox allows you to create custom sections for different PR categories like "Needs your review" or "Waiting for review" and share these configurations with teammates:

  1. Navigate to your Graphite PR inbox.
  2. Click the ⚙️ icon next to the section you want to share.
  3. Scroll down and select "Share filters". This generates a shareable link.
  4. Send this link to your teammates to allow them to view PRs under the same filter settings.

Sharing and referencing pull requests is part of maintaining a smooth workflow in GitHub, and leveraging tools like Graphite's PR inbox can further enhance this process by organizing pull requests in a way that suits your team's needs, making information retrieval quicker and collaboration more effective. By integrating these practices into your workflow, you can ensure that your team communicates more efficiently and that no detail is overlooked during code reviews.

Git inspired
Graphite's CLI and VS Code extension make working with Git effortless.
Learn more

Built for the world's fastest engineering teams, now available for everyone