You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the repo is now public, stricter rules apply: workflows using GITHUB_TOKEN with elevated permissions (contents: write, pull-requests: write) to create PRs are not allowed. PR #185 (chore: bump Motoko to v1.7.0) was created this way and must be closed.
The pr-automation-bot-public GitHub App has been granted access to this repo by Bas and should be used for all automated PR creation going forward.
What needs to change
File: .github/workflows/sync-motoko.yml
1. Remove the elevated permissions block
The current workflow declares:
permissions:
contents: writepull-requests: write
These permissions are required when using GITHUB_TOKEN to push branches and create PRs. With the app token they are no longer needed at the job level (the app's installation token carries its own permissions).
2. Add the app token step (at line 23, before the first GH_TOKEN usage)
Close PR chore: bump Motoko to v1.7.0 #185 with a note that the workflow will be re-triggered manually once the new setup is in place
Re-trigger the Motoko release check workflow manually via workflow_dispatch to verify the new bot-based PR creation works end-to-end for the same Motoko v1.7.0 sync
Background
Since the repo is now public, stricter rules apply: workflows using
GITHUB_TOKENwith elevated permissions (contents: write,pull-requests: write) to create PRs are not allowed. PR #185 (chore: bump Motoko to v1.7.0) was created this way and must be closed.The
pr-automation-bot-publicGitHub App has been granted access to this repo by Bas and should be used for all automated PR creation going forward.What needs to change
File:
.github/workflows/sync-motoko.yml1. Remove the elevated
permissionsblockThe current workflow declares:
These permissions are required when using
GITHUB_TOKENto push branches and create PRs. With the app token they are no longer needed at the job level (the app's installation token carries its own permissions).2. Add the app token step (at line 23, before the first
GH_TOKENusage)Reference: how the
sdkrepo uses this action — https://github.com/dfinity/sdk/blob/db214a5974444beb3cad66a1b30bfc108acf1937/.github/workflows/update-motoko.yml#L633. Replace
secrets.GITHUB_TOKENwith the app tokenThere are two places in the workflow that use
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}:caffeinelabs/motokorelease viagh release viewgh pr createBoth should become:
After the changes are merged
Motoko release checkworkflow manually viaworkflow_dispatchto verify the new bot-based PR creation works end-to-end for the same Motoko v1.7.0 syncOrg-level credentials
PR_AUTOMATION_BOT_PUBLIC_APP_IDPR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY