Commit 97e8b74
Rebase local commits before pushing to handle PR-branch drift (#763)
The skill step takes 20-45 min. During that window, someone often
pushes merges from main to the PR branch (refreshing against latest
review feedback). When the workflow's final "Commit and push" step
then tries to push its local state, git rejects with:
! [rejected] HEAD -> renovate/... (fetch first)
error: failed to push some refs
Seen on run 24745672604 (skill completed successfully in 14 min,
push rejected at the finish).
Fix:
- After committing any skill content, fetch the PR branch's
current tip.
- If origin is at or ahead of local (no new local commits), skip
the push entirely. This is the common case when the skill
produces no content changes.
- Otherwise rebase local commits onto origin/HEAD_REF so we
integrate any drift (merges, manual edits) before pushing.
- Conflicts during rebase fail the step loudly with an
actionable message.
Same protection applied to the earlier "Commit + push refreshed
reference assets" step; the race window is smaller there but still
non-zero.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fabfc95 commit 97e8b74
1 file changed
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
| |||
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
591 | | - | |
592 | 599 | | |
593 | 600 | | |
594 | 601 | | |
595 | 602 | | |
596 | 603 | | |
597 | 604 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
601 | 623 | | |
602 | 624 | | |
603 | 625 | | |
| |||
0 commit comments