# Set this line in .config to use SSH key to rebase PR branch
# GITHUB_USE_SSH=1
+SCRIPT_DIR="$(dirname $0)"
+[ -h $0 ] && SCRIPT_DIR="$(dirname $(readlink $0))"
+
# Everything in .config will overwrite the default values set up
-[ -f .config ] && source .config
+[ -f "$SCRIPT_DIR/.config" ] && source "$SCRIPT_DIR"/.config
PRID="$1"
BRANCH="${2:-main}"
# 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\"\")
+ return message.replace(b\"Signed-off-by: $(git config user.name) <$(git config user.email)>\n\",b\"\")
" --refs $BRANCH..$LOCAL_PR_BRANCH --force; then
echo "Failed to remove previous Committer SoB tag" >&2
exit 9