Skip to content

Grant discussions: write to the Lock Threads workflow - #1212

Open
dwcullop wants to merge 2 commits into
mainfrom
u/dacullop/main/fix_lock_threads_permissions
Open

dwcullop wants to merge 2 commits into
mainfrom
u/dacullop/main/fix_lock_threads_permissions

Conversation

@dwcullop

Copy link
Copy Markdown
Member

The scheduled Lock Threads workflow has failed on every run since at least Sep 2025 with Resource not accessible by integration.

Root cause: dessant/lock-threads v5 and later also processes closed discussions by default (discussion-inactive-days defaults to 365), and Discussions is enabled on this repository. The workflow grants only issues: write and pull-requests: write. Issues and PRs still get locked, but the discussions pass then fails and fails the run.

Fix: add discussions: write to the workflow's permissions block.

dessant/lock-threads v5+ also locks closed discussions by default
(discussion-inactive-days defaults to 365), and this repository has
Discussions enabled. Without discussions: write the GITHUB_TOKEN cannot
query or lock discussions, so every scheduled run failed with
'Resource not accessible by integration'.

This branch has not been deployed

No deployments
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