]> git.lizzy.rs Git - rust.git/blob - util/fetch_prs_between
Auto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch
[rust.git] / util / fetch_prs_between
1 #!/bin/sh
2
3 # Fetches the merge commits between two git commits and prints the PR URL
4 # together with the full commit message
5 #
6 # If you want to use this to update the Clippy changelog, be sure to manually
7 # exclude the non-user facing changes like 'rustup' PRs, typo fixes, etc.
8
9 first=$1
10 last=$2
11
12 IFS='
13 '
14 for pr in $(git log --oneline --grep "Merge #" --grep "Merge pull request" --grep "Auto merge of" "$first...$last" | sort -rn | uniq); do
15   id=$(echo $pr | rg -o '#[0-9]{3,5}' | cut -c 2-)
16   commit=$(echo $pr | cut -d' ' -f 1)
17   echo "URL: https://github.com/rust-lang/rust-clippy/pull/$id"
18   echo "$(git --no-pager show --pretty=medium $commit)"
19   echo "---------------------------------------------------------\n"
20 done