Skip to content

Commit

Permalink
contrib: Request author review during backports
Browse files Browse the repository at this point in the history
When submitting backports, request the original author's review.

Suggested-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
  • Loading branch information
joestringer authored and aditighag committed Jun 11, 2021
1 parent ad65c79 commit 991d15f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/backporting/submit-backport
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ if ! git branch -a | grep -q "${UPSTREAM_REMOTE}/v${BRANCH}$" || [ ! -e "$SUMMAR
echo "(branch version: ${BRANCH}, pr-summary: ${SUMMARY}, upstream remote: ${UPSTREAM_REMOTE})" 1>&2
exit 1
fi
AUTHORS="$(grep -ho "@[^)]*" "$SUMMARY" | sort -u | tr '\n' ',' | sed -e 's/@//g' -e 's/,$//')"

echo -e "Sending PR for branch v$BRANCH:\n" 1>&2
cat $SUMMARY 1>&2
echo -e "\nSending pull request..." 2>&1
PR_BRANCH=$(git rev-parse --abbrev-ref HEAD)
git push -q "$USER_REMOTE" "$PR_BRANCH"
hub pull-request -b "v$BRANCH" -l kind/backports,backport/$BRANCH -F $SUMMARY
hub pull-request -b "v$BRANCH" -l kind/backports,backport/$BRANCH -F $SUMMARY -r $AUTHORS

prs=$(grep "contrib/backporting/set-labels.py" $SUMMARY | sed -e 's/^.*for pr in \([0-9 ]\+\);.*$/\1/g')
echo -e "\nUpdating labels for PRs $prs\n" 2>&1
Expand Down

0 comments on commit 991d15f

Please sign in to comment.