Link: https://github.com/$REPO/pull/$PRID
included in the commit by removing any already present entry with the
same link.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+ # Remove any previous Link: https://github.com/$REPO/pull/$PRID tag
+ if ! $GIT filter-repo --message-callback "
+ return message.replace(b\"Link: https://github.com/$REPO/pull/$PRID\n\",b\"\")
+ " --refs $BRANCH..$LOCAL_PR_BRANCH --force; then
+ echo "Failed to remove previous Link: https://github.com/$REPO/pull/$PRID tag" >&2
+ exit 9
+ fi
+
# Add to each commit Link: https://github.com/$REPO/pull/$PRID
if ! $GIT filter-repo --message-callback "
return message + b\"Link: https://github.com/$REPO/pull/$PRID\"
# Add to each commit Link: https://github.com/$REPO/pull/$PRID
if ! $GIT filter-repo --message-callback "
return message + b\"Link: https://github.com/$REPO/pull/$PRID\"