Skip to content

avrodrigues5/pr-description-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

GitHub PR Export Script

This script uses the GitHub CLI (gh) to fetch pull requests from a repository, filter them by label, and format the results into a text file.
It’s especially useful for generating release notes from merged PRs.


Prerequisites

  1. Install the GitHub CLI

    On macOS (Homebrew):

    brew install gh

    Or see full installation instructions.

  2. Authenticate with GitHub

    Run:

    gh auth login

    You only need to do this once. The CLI will prompt you to log in via web or token.

  3. Verify authentication

    gh auth status

    You should see your GitHub username and authenticated host.


Usage

./generate-release-notes.sh -O OWNER -R REPO -L LABEL -o OUTPUTFILE

Arguments

  • -O OWNER → Repository owner (e.g., owner)
  • -R REPO → Repository name (e.g., repoName)
  • -L LABEL → Label to filter PRs (e.g., v1.0)
  • -N NUMBER → Number of PRs to fetch (e.g., 10)
  • -o OUTPUTFILE → Output file to write formatted results

Example

./gh-pr-export.sh -O owner -R repo-name -L v1.0 -N 5 -o pr_notes.txt

This will generate a file like:

PR #1
----------
Title: First PR
Body : This is body of first PR...

PR #2
----------
Title: Second PR
Body : This is body of second PR...

Notes

  • Only merged PRs are included.
  • You must be authenticated with GitHub CLI (gh auth login) before running the script.
  • You can run the script from anywhere if it’s in your $PATH.

About

Shell script that creates PR notes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages