Skip to content

Fix leaderboard workflow: rename secret to GIT_PAT, add schedule trigger, fix push permissions#7

Merged
jaseel0 merged 2 commits intomainfrom
copilot/add-leaderboard-automation-system
Mar 9, 2026
Merged

Fix leaderboard workflow: rename secret to GIT_PAT, add schedule trigger, fix push permissions#7
jaseel0 merged 2 commits intomainfrom
copilot/add-leaderboard-automation-system

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

The leaderboard workflow was failing with Permission denied on push because it referenced a non-existent PAT_TOKEN secret (falling back to the limited github-actions[bot] token), and was triggered by push/PR/issue events instead of a daily schedule.

Changes

profile/scripts/updateReadme.js

  • process.env.PAT_TOKENprocess.env.GIT_PAT

.github/workflows/update-readme.yml

  • Triggers: replaced push/PR/issue/review events with schedule: cron: '0 0 * * *' + workflow_dispatch
  • Permissions: added contents: write so the bot can push
  • Secret: secrets.PAT_TOKENsecrets.GIT_PAT throughout
  • No-op handling: replaced git commit ... || echo "No changes" (which still ran git push) with a proper git diff --staged --quiet guard
  • Push target: replaced hardcoded HEAD:main with HEAD:${{ github.event.repository.default_branch }}
  • Loop prevention: added [skip ci] to the commit message
  • Added npm install step scoped to profile/scripts

profile/scripts/package.json (new)

  • Declares the scripts package with engines: { node: ">=20" } matching the workflow's setup-node version

✨ 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] Add complete GitHub leaderboard automation system Fix leaderboard workflow: rename secret to GIT_PAT, add schedule trigger, fix push permissions Mar 9, 2026
@naheel0 naheel0 marked this pull request as ready for review March 9, 2026 17:26
@naheel0 naheel0 requested review from jaseel0 and naheel0 as code owners March 9, 2026 17:26
@jaseel0 jaseel0 merged commit fe5ebfa into main Mar 9, 2026
1 check passed
@jaseel0 jaseel0 deleted the copilot/add-leaderboard-automation-system branch March 9, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants