Read Anthropic’s case study about Graphite Reviewer

Managing pull request keywords and references in GitHub

Sara Verdi
Sara Verdi
Graphite software engineer

Utilizing keywords and correctly linking pull requests to issues can automate tedious parts of the workflow, such as closing related issues. This guide will look into how to use pull request keywords and references effectively, and how tools like Graphite's PR Inbox can optimize these processes.

GitHub supports several keywords that help automate the closure of issues when a pull request (PR) is merged. Here are the most commonly used ones:

  • close
  • closes
  • closed
  • fix
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved

To link a PR to an issue and automate its closure upon the PR's merge, include one of the above keywords followed by the issue number in your PR description. For example:

Terminal
Fixes #123

This will link the PR to issue #123, and once the PR is merged, the issue will automatically close, indicating that the problem or task the issue addressed has been resolved through the changes in the PR.

  • Be precise: Link PRs only to the issues they are meant to resolve to avoid accidentally closing unrelated issues.
  • Use in the main description: Place the keyword linkage at the end of your PR's main description for visibility.
  • Review linked issues: Always review which issues are linked before merging a PR to ensure accuracy.

[Graphite's PR Inbox]!(https://graphite.dev/docs/use-pr-inbox) provides an interface to manage PRs efficiently. Key features include:

  • Aggregated views: See all linked issues and their status directly from the PR Inbox.
  • Quick actions: Easily link or unlink issues without navigating away from the inbox.
  • Integrated search: Find and link relevant issues using the advanced search capabilities.

Leveraging Graphite's PR Inbox allows teams to manage their pull requests and issues more dynamically and with better oversight.

By using PR keywords and references judiciously, you automate part of the workflow, reducing the manual tracking efforts. Plus, bringing in tools like Graphite's PR Inbox further enhances visibility and control, ensuring that PRs and their linked issues are managed more efficiently and with less overhead.

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

Graphite
Git stacked on GitHub

Stacked pull requests are easier to read, easier to write, and easier to manage.
Teams that stack ship better software, faster.

Or install our CLI.
Product Screenshot 1
Product Screenshot 2