Skip to content

Commit

Permalink
sync-upstream: Create proper links to upstream PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Mar 10, 2021
1 parent 6da00ec commit 38f1e77
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/sync-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ case $1 in
help
esac

TITLE="Upstream PRs "
TITLE="Upstream PRs"
BODY=""
for COMMIT in $COMMITS
do
PRNUM=$(git log -1 "$COMMIT" --pretty=format:%s | sed s/'Merge #\([0-9]*\).*'/'\1'/)
TITLE="$TITLE #$PRNUM"
BODY=$(printf "%s\n%s" "$BODY" "$(git log -1 "$COMMIT" --pretty=format:%s | sed s/'Merge #\([0-9]*\)'/'[upstream PR #\1]'/)")
TITLE="$TITLE $PRNUM,"
BODY=$(printf "%s\n%s" "$BODY" "$(git log -1 "$COMMIT" --pretty=format:%s | sed s/'Merge #\([0-9]*\)'/'[bitcoin-core\/secp256k1#\1]'/)")
done
# Remove trailing ","
TITLE=${TITLE%?}

BODY=$(printf "%s\n\n%s" "$BODY" "This PR was automatically created with \\\`$0 $*\\\`.")

Expand Down

0 comments on commit 38f1e77

Please sign in to comment.