Summary
set_issue_field currently skips all issue field updates when issue fields are present and visible, because its discovery query is no longer valid against the current GitHub GraphQL schema.
The handler reports:
No issue fields were discovered for this repository. Verify issue fields are enabled and visible to this token.
but the underlying problem is a GraphQL validation error, not missing fields.
Root cause
fetchIssueFields() in actions/setup/js/set_issue_field.cjs queries IssueFields.nodes like this:
nodes {
__typename
id
name
... on IssueFieldSingleSelect {
options { id name }
}
}
IssueFields is a union, so id and name cannot be selected directly. They need to be selected inside concrete type fragments.
The same query also includes:
... on User {
issueFields(first: 100) { ... }
}
but User.issueFields is not present in the current schema.
Reproducing the current query with gh api graphql returns:
Selections can't be made directly on unions (see selections on IssueFields)
Field 'issueFields' doesn't exist on type 'User'
fetchIssueFields() catches that error and returns [], which makes the handler incorrectly treat the failure as "no fields discovered".
Expected behavior
When issue fields exist, set_issue_field should discover them and apply the requested value.
When discovery fails because of a GraphQL/schema/permission error, the handler should surface that error instead of converting it into a skipped "no fields discovered" result.
Proposed fix
Update fetchIssueFields() in actions/setup/js/set_issue_field.cjs to query concrete IssueFields union members, for example:
nodes {
__typename
... on IssueFieldText { id name }
... on IssueFieldNumber { id name }
... on IssueFieldDate { id name }
... on IssueFieldSingleSelect { id name options { id name } }
... on IssueFieldMultiSelect { id name options { id name } }
}
Also remove the invalid ... on User { issueFields } branch. Keep the repository-level lookup and, if still needed, the Organization.issueFields fallback.
Implementation plan
- Fix the GraphQL query in
actions/setup/js/set_issue_field.cjs.
- Make
fetchIssueFields() distinguish between:
- successful query with zero fields, which can still skip gracefully;
- GraphQL/schema/permission failure, which should return an actionable error.
- Clarify the
field_node_id behavior. The current tool description says it can skip discovery, but the implementation still requires discovery to resolve field type and validate the ID.
- Add tests in
actions/setup/js/set_issue_field.test.cjs for:
- concrete fragments on
IssueFields;
- no direct
id/name selection on the union;
- no
User.issueFields selection;
- GraphQL discovery errors are not reported as "No issue fields were discovered";
- successful empty discovery still skips gracefully.
- Update generated tool metadata/docs if the
field_node_id wording changes.
- Run the project validation, including
make agent-finish.
Versions checked
gh-aw: v0.79.6
gh-aw-actions: v0.79.7
The same invalid discovery query is present in the latest checked release artifacts.
Summary
set_issue_fieldcurrently skips all issue field updates when issue fields are present and visible, because its discovery query is no longer valid against the current GitHub GraphQL schema.The handler reports:
but the underlying problem is a GraphQL validation error, not missing fields.
Root cause
fetchIssueFields()inactions/setup/js/set_issue_field.cjsqueriesIssueFields.nodeslike this:IssueFieldsis a union, soidandnamecannot be selected directly. They need to be selected inside concrete type fragments.The same query also includes:
but
User.issueFieldsis not present in the current schema.Reproducing the current query with
gh api graphqlreturns:fetchIssueFields()catches that error and returns[], which makes the handler incorrectly treat the failure as "no fields discovered".Expected behavior
When issue fields exist,
set_issue_fieldshould discover them and apply the requested value.When discovery fails because of a GraphQL/schema/permission error, the handler should surface that error instead of converting it into a skipped "no fields discovered" result.
Proposed fix
Update
fetchIssueFields()inactions/setup/js/set_issue_field.cjsto query concreteIssueFieldsunion members, for example:Also remove the invalid
... on User { issueFields }branch. Keep the repository-level lookup and, if still needed, theOrganization.issueFieldsfallback.Implementation plan
actions/setup/js/set_issue_field.cjs.fetchIssueFields()distinguish between:field_node_idbehavior. The current tool description says it can skip discovery, but the implementation still requires discovery to resolve field type and validate the ID.actions/setup/js/set_issue_field.test.cjsfor:IssueFields;id/nameselection on the union;User.issueFieldsselection;field_node_idwording changes.make agent-finish.Versions checked
gh-aw: v0.79.6gh-aw-actions: v0.79.7The same invalid discovery query is present in the latest checked release artifacts.