Fix auto-pr to not fail when branches are already in sync

This commit is contained in:
2026-03-02 15:08:14 +03:00
parent 20c5fd20cc
commit 7a087cfa14
+8 -3
View File
@@ -23,13 +23,18 @@ jobs:
if [ -n "$EXISTING_PR" ]; then
echo "PR #$EXISTING_PR already exists — new commits will appear automatically"
else
exit 0
fi
echo "Creating new PR: master → main"
gh pr create \
if gh pr create \
--base main \
--head master \
--title "Sync: master → main" \
--body "Automated PR to sync master branch changes to main.
This PR was created automatically and will be merged once CI checks pass."
This PR was created automatically and will be merged once CI checks pass."; then
echo "PR created successfully"
else
echo "PR creation skipped (branches may already be in sync)"
fi