mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-16 22:18:40 +00:00
Add script to fetch GitHub PRs between two commits
This commit is contained in:
parent
1e4f44853c
commit
1adc35703f
1 changed files with 20 additions and 0 deletions
20
util/fetch_prs_between
Executable file
20
util/fetch_prs_between
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Fetches the merge commits between two git commits and prints the PR URL
|
||||
# together with the full commit message
|
||||
#
|
||||
# If you want to use this to update the Clippy changelog, be sure to manually
|
||||
# exclude the non-user facing changes like 'rustup' PRs, typo fixes, etc.
|
||||
|
||||
first=$1
|
||||
last=$2
|
||||
|
||||
IFS='
|
||||
'
|
||||
for pr in $(git log --oneline --grep "Merge #" --grep "Merge pull request" --grep "Auto merge of" "$first...$last" | sort -rn | uniq); do
|
||||
id=$(echo $pr | rg -o '#[0-9]{3,5}' | cut -c 2-)
|
||||
commit=$(echo $pr | cut -d' ' -f 1)
|
||||
echo "URL: https://github.com/rust-lang/rust-clippy/pull/$id"
|
||||
echo "$(git --no-pager show --pretty=medium $commit)"
|
||||
echo "---------------------------------------------------------\n"
|
||||
done
|
Loading…
Add table
Reference in a new issue