Skip to content

Fix detached HEAD push failure in update-readme workflow#5

Merged
naheel0 merged 2 commits intomainfrom
copilot/fix-error-pushing-changes
Mar 9, 2026
Merged

Fix detached HEAD push failure in update-readme workflow#5
naheel0 merged 2 commits intomainfrom
copilot/fix-error-pushing-changes

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

Triggered events like pull_request, issues, and pull_request_review cause Actions to check out in a detached HEAD state, making a bare git push fail since there's no branch ref to push to.

Change

Replaced git push with an explicit refspec targeting main:

- git push
+ git push origin HEAD:main

This ensures the leaderboard update always lands on main regardless of the triggering event or checkout state.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jaseel0 <225665919+jaseel0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error encountered while pushing changes Fix detached HEAD push failure in update-readme workflow Mar 9, 2026
@jaseel0 jaseel0 marked this pull request as ready for review March 9, 2026 16:26
@jaseel0 jaseel0 requested review from jaseel0 and naheel0 as code owners March 9, 2026 16:26
@jaseel0 jaseel0 added the ci label Mar 9, 2026
@naheel0 naheel0 merged commit 5f95336 into main Mar 9, 2026
1 check passed
@naheel0 naheel0 deleted the copilot/fix-error-pushing-changes branch March 9, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants