DEV Community

Marco Lamina for PR Pilot

Posted on

Mastering PR Descriptions: Make Your PRs Stand Out

TL;DR

Learn how to generate beautiful and comprehensive descriptions effortlessly for even the largest pull requests in minutes using PR Pilot.

Introduction

Good PR descriptions are crucial for effective collaboration and project management. But they can be time-consuming and tedious to write. Enter PR Pilot – your new best friend for creating consistent, clear, and beautiful PR descriptions effortlessly.

What it will look like

Here is a real-life example with 14 commits and 19 changed files:

Image description

The title and description were generated by PR Pilot in seconds. The PR description is clear, concise, and informative, making it easy for reviewers to understand the changes made.

Benefits of Using Generative AI for PR Descriptions

  • πŸ“ Consistency: Ensures that all your PR descriptions follow a consistent format by storing the instructions as part of your code.

  • ⏱️ Time-saving: No more spending hours crafting the perfect PR description. PR Pilot does it for you in seconds!

  • 🎨 Customizable: Use our customizable prompt template to tailor PR descriptions to your project's specific needs.

Satisfied Meme

How it Works

It's dead simple. All you do is run pilot run pr-description and:

  1. The agent asks you for the PR number
  2. It will read the PR description, comments, commits and code changes
  3. It will generate a new PR description based on your preferences

See customizable prompt used for generating the description
I've made some changes and opened a new PR: #{{ env('PR_NUMBER') }}.

I need a PR title and a description that summarizes these changes in short, concise bullet points.
The PR description will also be used as merge commit message, so it should be clear and informative.

Use the following guidelines:

## PR Title
- Start with a verb in the imperative mood (e.g., "Add", "Fix", "Update").
- Put an emoji at the beginning that reflects the nature of the changes

## PR Body

- At the very top, provide short paragraph summarizing the changes and their impact.
- Below, list the changes made in bullet points.
- Use bold text instead of sections/sub-sections to separate the bullet points into topics
- There should be no more than 3-4 topics
- Use the present tense and the active voice.
- Be specific - Include names, paths, identifiers, names, versions, etc
- Where possible, make file names/paths clickable using Markdown links. Use this format for the URL: `https://github.com/<github_project>/blob/<pr_branch>/<file_path>`


# Your task
Edit PR #{{ env('PR_NUMBER') }} title and description to reflect the changes made in this PR.
Respond only with a link to the PR.
Enter fullscreen mode Exit fullscreen mode

How to Get Started

Getting started with PR Pilot is a breeze! Follow these simple steps:

1️⃣ Install the CLI via Homebrew

brew tap pr-pilot-ai/homebrew-tap
brew install pr-pilot-cli
Enter fullscreen mode Exit fullscreen mode

2️⃣ Grab the prompt: Download the prompt template from our core repo:

pilot grab commands pr-pilot-ai/core
Enter fullscreen mode Exit fullscreen mode

3️⃣ Customize the template: Adjust the downloaded prompt template to suit your project's needs.

4️⃣ Run the prompt: Generate a PR description with a single command:

pilot run pr-description
Enter fullscreen mode Exit fullscreen mode

Links / Resources

Ready to transform your PR descriptions? πŸš€ Give PR Pilot a try today and experience the difference! Share your experiences and tips in the comments below. Let's make PR descriptions beautiful together! πŸ’¬βœ¨


Top comments (0)