From db54a345e510b88f7f0f6623428f5198efe50396 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 29 Apr 2024 12:22:37 +0200 Subject: [PATCH] github-merge-pr: use --force for filter-repo commands Use --force for filter-repo commands to handle special branch merged by Committer that wouldn't be fresh copy as required by filter-repo commands. Signed-off-by: Christian Marangi --- github-merge-pr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index b2c94b5..4a61a3f 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -123,7 +123,7 @@ if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then # 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\" - " --refs $BRANCH..$LOCAL_PR_BRANCH; then + " --refs $BRANCH..$LOCAL_PR_BRANCH --force; then echo "Failed to add Link: Pull Request tag" >&2 exit 9 fi @@ -131,7 +131,7 @@ if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then # Remove any previous SoB tag if the Pull Request Author and Committer match if ! $GIT filter-repo --message-callback " return message.replace(b\"Signed-off-by: $(git config user.name) <$(git config user.email)>\",b\"\") - " --refs $BRANCH..$LOCAL_PR_BRANCH; then + " --refs $BRANCH..$LOCAL_PR_BRANCH --force; then echo "Failed to remove previous Committer SoB tag" >&2 exit 9 fi -- 2.30.2