Skip to content

fix: handle concurrent push rejection in generate-leaderboard workflow#13

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-push-rejection-error
Draft

fix: handle concurrent push rejection in generate-leaderboard workflow#13
Copilot wants to merge 2 commits intomainfrom
copilot/fix-push-rejection-error

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

When multiple workflow runs overlap (e.g. scheduled + push-triggered), the second git push gets rejected with fetch first because the remote has advanced since checkout.

Changes

  • generate-leaderboard.yml: Add git pull --rebase --autostash origin main between git commit and git push to incorporate any remote commits before pushing. Includes explicit failure message if rebase hits unresolvable conflicts.
-          git commit -m "chore: update leaderboard data"
-          git push
+          git commit -m "chore: update leaderboard data"
+          git pull --rebase --autostash origin main || (echo "Rebase failed due to conflicts" && exit 1)
+          git push

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: A1L13N <193832434+A1L13N@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix push rejection due to remote changes fix: handle concurrent push rejection in generate-leaderboard workflow Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants