Skip to content

infra: switch update-syntax-grammars to pr-automation-bot-public GitHub App#202

Merged
marc0olo merged 2 commits intomainfrom
infra/switch-syntax-grammars-to-app-token
May 5, 2026
Merged

infra: switch update-syntax-grammars to pr-automation-bot-public GitHub App#202
marc0olo merged 2 commits intomainfrom
infra/switch-syntax-grammars-to-app-token

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented May 5, 2026

Summary

Applies the same bot-token migration from #197 (`sync-motoko`) to the `Update syntax grammars` workflow, and adds the missing `BOT_APPROVED_FILES` policy that was needed for both workflows (the absence of this file caused the External PR Ruleset to block #201).

`update-syntax-grammars` changes:

`.github/repo_policies/BOT_APPROVED_FILES` (new):

  • `sync-motoko`: `.sources/motoko`, `.sources/VERSIONS`, `docs/languages/motoko/*`
  • `update-syntax-grammars`: `syntaxes/motoko.tmLanguage.json`, `syntaxes/candid.tmLanguage.json`

After this PR merges, #201 will need a re-run of the `External PR Ruleset` check to pass.

Sync recommendation

`hand-written`

…ub App

Replace GITHUB_TOKEN (with elevated permissions) with the
pr-automation-bot-public app token for all authenticated operations:
- Remove workflow-level contents: write + pull-requests: write permissions
- Add create-github-app-token step (client-id + private-key from org vars/secrets)
- Use app token for gh api, gh pr list, and gh pr create
- Update git identity to pr-automation-bot-public[bot]

Matches the pattern applied to sync-motoko.yml in #197.
@marc0olo marc0olo requested a review from a team as a code owner May 5, 2026 16:39
Covers all files changed by the two automated workflows:
- sync-motoko: .sources/motoko, .sources/VERSIONS, docs/languages/motoko/*
- update-syntax-grammars: syntaxes/*.tmLanguage.json

Required by the External PR Ruleset (dfinity/public-workflows
check_bot_approved_files.py) which blocked the v1.7.0 Motoko sync
PR (#201) with a 404 on this missing file.
@marc0olo marc0olo merged commit 6aa2f21 into main May 5, 2026
6 checks passed
@marc0olo marc0olo deleted the infra/switch-syntax-grammars-to-app-token branch May 5, 2026 18:06
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