X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=util%2Ffetch_prs_between.sh;h=6865abf971b282891e1da574766c4b0d577c5cac;hb=641ced4eb96d07fba2284fa258ccb987f7afc8a1;hp=36b4785ac87e5ade955115152dfc0aeb215d7f2a;hpb=6d9ee9e5eba16612bb2fc253f77673b823812b8a;p=rust.git diff --git a/util/fetch_prs_between.sh b/util/fetch_prs_between.sh index 36b4785ac87..6865abf971b 100755 --- a/util/fetch_prs_between.sh +++ b/util/fetch_prs_between.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Fetches the merge commits between two git commits and prints the PR URL # together with the full commit message @@ -11,15 +11,17 @@ 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) - message=$(git --no-pager show --pretty=medium $commit) - if [ ! -z $(echo "$message" | rg "^[\s]{4}changelog: [nN]one\.*$") ]; then +for pr in $(git log --oneline --grep "Merge #" --grep "Merge pull request" --grep "Auto merge of" --grep "Rollup 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) + message=$(git --no-pager show --pretty=medium "$commit") + if [[ -n $(echo "$message" | rg "^[\s]{4}changelog: [nN]one\.*$") ]]; then continue fi echo "URL: https://github.com/rust-lang/rust-clippy/pull/$id" + echo "Markdown URL: [#$id](https://github.com/rust-lang/rust-clippy/pull/$id)" echo "$message" - echo "---------------------------------------------------------\n" + echo "---------------------------------------------------------" + echo done