Last active
May 8, 2025 01:54
-
-
Save y16ra/8f3f2a7e4baeceba29bfec1eba4fdc53 to your computer and use it in GitHub Desktop.
This one-liner fetches the commit headlines for a pull request, filters lines that contain "Merge pull request", and then extracts only the PR numbers (e.g., #10) from those lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gh pr view 1 --json commits --jq '.commits[].messageHeadline' | grep "Merge pull request" | grep -o '#[0-9]\+' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR取得順ではなく、PRの番号順に並べ替える場合