Skip to content

Commit

Permalink
feat: try the force approach
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Nov 27, 2024
1 parent 3e7c869 commit e8c0c40
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/sync-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,8 @@ jobs:
git add .
git commit -m "chore: sync template" || echo "No changes to commit."
# Pull latest changes from the remote branch to avoid being behind
echo "Fetching the latest changes from the remote branch..."
git fetch origin "$pr_branch"
# Rebase the local branch with the latest changes from the remote branch
echo "Rebasing local branch with remote changes..."
git rebase origin/"$pr_branch" || {
echo "Rebase failed due to conflicts. Aborting rebase and attempting to resolve conflicts..."
git rebase --abort
exit 1
}
# Push changes to the remote repository
git push "$original_remote" "$pr_branch"
git push "$original_remote" "$pr_branch" --force
# Check for existing pull requests
existing_pr=$(gh pr list --base "$branch_name" --head "$pr_branch" --state open --json id --jq '.[0].id')
Expand Down

0 comments on commit e8c0c40

Please sign in to comment.