Skip to content

Grant workflow-scoped token to update-dependencies workflow#11

Merged
daviddenton merged 1 commit into
mainfrom
claude/kotlin-workflow-typeflows-export-pl560a
Jul 13, 2026
Merged

Grant workflow-scoped token to update-dependencies workflow#11
daviddenton merged 1 commit into
mainfrom
claude/kotlin-workflow-typeflows-export-pl560a

Conversation

@daviddenton

Copy link
Copy Markdown
Member

What

Give the update-dependencies workflow a token with the workflow scope, and re-export the generated YAML.

Why

The update-dependencies workflow runs ./gradlew ... typeflowsExport, which regenerates the files under .github/workflows. When those regenerated files differ, peter-evans/create-pull-request tries to commit them — but the default GITHUB_TOKEN is not permitted to create or update workflow files (refusing to allow a GitHub App to create or update workflow ... without workflows permission).

Note there is no workflows entry for a job's permissions: block in GitHub Actions (the 15 job-level scopes don't include it) — the "workflows permission" lives on the token. So the fix is to supply a token that carries the workflow scope, rather than a permissions: change.

Changes

In UpdateGradleProjectDependencies.kt:

  • Reuse the existing TOOLBOX_REPO_TOKEN org secret (already used by Build.kt) as the token for both the Checkout step and the peter-evans/create-pull-request step.
  • Ran typeflowsExport, regenerating .github/workflows/update-dependencies.yml and the .github/typeflows/update-dependencies/README.md visualisation.

🤖 Generated with Claude Code

https://claude.ai/code/session_0112sPKfNyutkzWEDWsjHXAZ


Generated by Claude Code

The update-dependencies workflow runs typeflowsExport, which regenerates
.github/workflows files. The default GITHUB_TOKEN cannot create or update
workflow files, so peter-evans/create-pull-request needs a token with the
`workflow` scope. Reuse the existing TOOLBOX_REPO_TOKEN for both checkout
and the PR creation, and re-export the generated YAML.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112sPKfNyutkzWEDWsjHXAZ
@daviddenton daviddenton merged commit 8275acd into main Jul 13, 2026
2 checks passed
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