Read Anthropic’s case study about Graphite Reviewer

Automatic release note generation from pull requests

Sara Verdi
Sara Verdi
Graphite software engineer
Try Graphite

Manually creating release notes from pull requests (PRs) can be tedious and error-prone, especially in fast-paced development environments. Automating this process ensures consistent, accurate release documentation while saving time. By leveraging tools like GitHub and Graphite Automations, teams can generate release notes directly from PR metadata.

Release notes are documents that accompany software updates, detailing the changes made in a particular version. These notes help users and stakeholders understand what’s new, improved, fixed, or removed. Release notes serve as a communication tool to inform users about the software's evolution and guide them in using the updated version effectively.

  1. Version number: Identifies the specific release, often following semantic versioning (e.g., 1.2.3).
  2. Release date: The date the version is made available.
  3. Summary: A brief overview of the release's purpose, such as new features or bug fixes.
  4. Categories of changes:
    • Features: New functionality added to the software.
    • Improvements: Enhancements to existing features.
    • Bug fixes: Resolved issues or errors in the software.
    • Deprecations: Features that are being phased out.
    • Removals: Features or components that are no longer available.
  5. Known issues: Any problems that remain unresolved in the release.
  6. Instructions: Guidance for installing or upgrading to the new version.
  • Transparency: They keep users informed about what has changed and why.
  • Usability: Highlighting new features and improvements helps users leverage the software effectively.
  • Accountability: Bug fixes and issue resolutions show the development team's responsiveness to feedback.
  • Documentation: Release notes act as a historical record of software changes.

Ultimately, release notes help ensure that all stakeholders, from developers to end-users, are aligned on the software's current state and capabilities. Let's explore how to automatically generate them from PRs.

Structured labels and metadata in PRs are essential for generating meaningful release notes. For example, adding labels like feature, bugfix, and documentation helps categorize changes. Similarly, ensuring PR titles follow a consistent format improves readability in the final release notes.

Graphite simplifies the labeling process by allowing you to automate label assignment based on PR triggers. For example:

  • Trigger condition: PR contains files in src/frontend/.
  • Action: Assign the label frontend.

To set this up in Graphite:

  1. Navigate to the Automations section in the Graphite web app.
  2. Click Create rule.
  3. Configure a filter trigger (e.g., files matching **/frontend/**).
  4. Set the action to Add label (e.g., frontend).
  5. Activate the rule to apply it automatically to new PRs.

screenshot of setting up automations

GitHub provides a basic mechanism to generate release notes. When drafting a release, GitHub can pull PR titles and labels to create a changelog.

  1. Navigate to the releases page: Go to the repository and click Releases.

    screenshot of releases in your repo

  2. Draft a new release: Click Draft a new release and select the target branch.

screenshot of creating a new release

  1. Automated changelog: Enable "Generate release notes" to auto-populate the changelog with merged PRs.

Graphite's automation capabilities enhance release notes generation by:

  • Automatically applying consistent labeling and categorization rules.
  • Reducing manual effort and ensuring accuracy.
  • Providing integration options for advanced workflows.

By incorporating Graphite Automations, teams can streamline their release process and focus on delivering high-quality software.

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