-
Notifications
You must be signed in to change notification settings - Fork 109
Description
Following the instructions in https://githubnext.github.io/gh-aw/setup/quick-start the workflow daily-team-status has some strange problem.
The demo works until the step where the discussions in the github project should be created.
I get the following error:
Error: Failed to create discussion in 'bmerkle/gh-aw-python-project': Request failed due to following response errors:
- Resource not accessible by personal access token. Common causes: (1) Discussions not enabled in repository settings, (2) Invalid category ID, or (3) Insufficient permissions. Verify discussions are enabled at https://github.com/bmerkle/gh-aw-python-project/settings and check the category configuration.
I made everything sure:
- discussions are enable
- the category is there and can be found. I
- the problem seem to be with Insufficient permissions
I started also a copilot session and the outcome was the setting which are already enabled to it is difficult to trace this problem:
Appended is the screenshot of the current setting and the output of copilot /agent debug-agentic-workflow
output of copilot /agent debug-agentic-workflow
The workflow ran but still failed to create the discussion with the same error:
Resource not accessible by personal access token
This confirms that the repository workflow permissions haven't been updated yet or weren't saved correctly.
🔧 Action Required: Update Repository Settings
Please follow these exact steps:
- Go to: https://github.com/bmerkle/gh-aw-python-project/settings/actions
- Scroll down to "Workflow permissions"
- You should see two radio button options:
- ⚪ Read repository contents and packages permissions (currently selected)
- ⚪ Read and write permissions ← SELECT THIS ONE
- Check the box below (if present):
- ☑️ Allow GitHub Actions to create and approve pull requests
- Click "Save" at the bottom
🎯 Why This Is Needed
The workflow file has discussions: write permission, but GitHub Actions limits what the GITHUB_TOKEN can do based on repository-level settings. By default, tokens are read-only,
which is why discussions can't be created even though the workflow requests write permission.
✅ After You've Updated the Settings
Once you've changed the workflow permissions in the repository settings and clicked Save, let me know and I'll run the workflow again to verify it works!
Just reply with "done" or "updated" and I'll test it immediately! 🚀