A bash script to list merged pull requests from a GitHub repository in an Excel-ready format.
- 📅 List PRs merged after a specific date
- 🔢 List the last N merged PRs
- 📋 Excel-ready output with hyperlinks
- 🏷️ Includes PR labels
- 🔒 Read-only - safe to run on any repository
- GitHub CLI (
gh) - installed and authenticated jq- JSON processor
# Install GitHub CLI (macOS)
brew install gh
# Install jq
brew install jq
# Authenticate GitHub CLI
gh auth login./list_repo_pr.sh --since "2024-10-15T10:30Z"./list_repo_pr.sh --last 10./list_repo_pr.sh --repo "owner/repo" --last 5By default, the script auto-detects the repository from the current git directory or the GITHUB_REPOSITORY environment variable.
The script outputs data in a pipe-delimited format that can be copied directly into Excel:
ID|Description|Hyperlink
#123|Fix user authentication bug [bug, security]|https://github.com/owner/repo/pull/123
#124|Add dark mode feature [enhancement]|https://github.com/owner/repo/pull/124
Simply copy the output and paste it into Excel - the hyperlinks will be automatically detected.
Use ISO 8601 format for dates:
2024-10-15T10:30Z2024-10-15T10:30:00Z
./list_repo_pr.sh --help- Tested with
bashandzsh. - Works on macOS and Linux.
- Requires network access for
gh(GitHub CLI) API calls.