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
{{ message }}
Repository navigation
Compiler unconditionally adds invalid discussions: write permission to safe-output jobs #25467
The gh aw compile command (v0.67.2) unconditionally adds discussions: write to the job permissions and permission-discussions: write to the create-github-app-token inputs for the conclusion and safe_outputs jobs whenever add-comment is configured in safe-outputs. However, discussions is not a valid GitHub Apps API permission scope, causing token minting to fail with:
HTTP 422: The permissions requested are not granted to this installation.
The create-github-app-token@v3 action also warns:
Unexpected input(s) 'permission-discussions', valid inputs are [... 'permission-team-discussions' ...]
Reproduction
Create a workflow with add-comment in safe-outputs using a github-app block:
# In conclusion job:permissions:
discussions: write # <-- invalidissues: write# In conclusion and safe_outputs token steps:permission-discussions: write # <-- not a valid GitHub Apps permission
When the workflow runs, create-github-app-token makes a POST to /app/installations/{id}/access_tokens requesting discussions: write, which the GitHub API rejects.
Attempted workarounds
Setting discussion: false on add-comment is rejected by the compiler: error: 'discussion': value must be true
Omitting discussion entirely still produces discussions: write in the lock file
Manually patching the lock file works but is undone by every recompile
Expected behavior
The compiler should either:
Not add discussions: write when the workflow doesn't use create-discussion / update-discussion / close-discussion safe outputs
Accept discussion: false on add-comment to opt out of discussion support
Use the correct API permission name (team_discussions if targeting team discussions)
This blocks ALL workflows that use add-comment with github-app authentication. We've had 6+ PRs trying to fix this in microsoft/aspire — each recompile reintroduces the bug.
Current workaround: surgical post-compile sed script to strip the 4 invalid lines.
Activity
pelikhan commentedon Apr 9, 2026
@copilot fix Setting discussion: false on add-comment is rejected by the compiler: error: 'discussion': value must be true
The user should be able to disable discussions support in the front matter.
Keep the same defaults.
pelikhan commentedon Apr 10, 2026
Try this (plural)
add-comment:
discussions: false
The GitHub app permissions is an issue on the actions create side which is being tracked by the github actions team
pelikhan commentedon Apr 10, 2026
(reopen as needed)
Update community contributions in README