ci: fix push failures on pipeline rerun - #47
Conversation
When the CI pipeline is re-run, duplicate commit creation and push failures can occur because the commits from the previous run may already exist on the remote branch. This handles two cases in `.github/workflows/ci.yml`: 1. For manual version bumps to the main branch, if a push is rejected (e.g. non-fast-forward), it performs a `git pull --rebase` to reconcile the local tree before retrying the push. Git rebase will gracefully drop the redundant local commit. 2. For the `ci-autofix` branch creation, it performs a force push (`git push -f origin "$BRANCH"`) so that the automated PR branch is properly updated and replaced instead of failing. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Updates
.github/workflows/ci.ymlto properly handle failures when pushing to the remote branch during workflow reruns. Specifically, it implements pull-rebase behavior for the main branch version bump to resolve non-fast-forward errors and force-pushing for the auto-fix branch.PR created automatically by Jules for task 17484252166140911272 started by @arran4