-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Labels
Description
Objective
Investigate and fix the API error that occurs when update-discussion handler is called with an explicit discussion_number in the message.
Context
From issue #23283 (smoke test findings): When the agent hardcoded discussion_number: 45 (because there was no triggering discussion in workflow_dispatch context), the API call failed with:
ERR_API: update discussion #45 failed (attempt 1)
The resolveDiscussionNumber() function in update_discussion.cjs correctly picks up the explicit number when item.discussion_number !== undefined, but the downstream GraphQL mutation fails.
Approach
- Open
actions/setup/js/update_discussion.cjsand find the GraphQL mutation used to update a discussion - Add better error logging to capture the full API response / error detail
- Check whether the failure is due to:
- Missing/wrong permissions in the GitHub token
- Incorrect GraphQL mutation variables (field names, types)
- Rate limiting or authentication issues
- The discussion being in a closed/locked state
- Fix the root cause and improve error messages to make failures more diagnosable in future runs
Files to Modify
actions/setup/js/update_discussion.cjs— fix GraphQL mutation and/or improve error handling/logging
Acceptance Criteria
- The
update-discussionhandler successfully updates a discussion when given an explicitdiscussion_number - Error messages include enough detail to diagnose failures (API response body, status code)
- The smoke test run passes for
update-discussionwhen the agent provides a validdiscussion_number
References
- Issue Safe-outputs discussions smoke test: update-discussion API error and close-discussion label enforcement #23283 (smoke test findings)
- Run: https://github.com/github/gh-aw-mcpg/actions/runs/23670080887
Related to Safe-outputs discussions smoke test: update-discussion API error and close-discussion label enforcement #23283
Generated by Plan Command for issue #23283 · ◷
- expires on Mar 30, 2026, 1:55 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.