github-merge-pr: follow GITHUB_REPO_OWNER/GITHUB_REPO_NAME for Link tag
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 Apr 2024 10:21:13 +0000 (12:21 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 Apr 2024 10:21:13 +0000 (12:21 +0200)
Follow GITHUB_REPO_OWNER/GITHUB_REPO_NAME for Link tag instead of
hardcoding to openwrt/openwrt.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
github-merge-pr.sh

index d63b3455cad93c3db18c05debe504e2900159ae2..b2c94b5d91947a8f75be9e0103d5563c765680bc 100755 (executable)
@@ -120,9 +120,9 @@ if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then
                exit 9
        fi
 
-       # Add to each commit Link: https://github.com/openwrt/openwrt/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/openwrt/openwrt/pull/$PRID\"
+               return message + b\"Link: https://github.com/$REPO/pull/$PRID\"
        " --refs $BRANCH..$LOCAL_PR_BRANCH; then
                echo "Failed to add Link: Pull Request tag" >&2
                exit 9