Remove invalid IssueField fragment from set_issue_field discovery query#39586
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Fix set_issue_field IssueField fragment and add API query integration test
Remove invalid Jun 16, 2026
IssueField fragment from set_issue_field discovery query
Copilot created this pull request from a session on behalf of
pelikhan
June 16, 2026 15:58
View session
Contributor
There was a problem hiding this comment.
⚠️ Not ready to approve
The new live-API integration test is currently brittle/mis-scoped for CI execution, and an unrelated generated workflow lockfile change should be dropped unless intentional.
Pull request overview
Fixes set_issue_field GraphQL field-discovery by removing an invalid ... on IssueField fragment that fails schema validation, keeping discovery queries limited to concrete issue field types.
Changes:
- Removed the invalid
... on IssueField { id name }fragment from repo/orgissueFieldsdiscovery selections. - Updated the unit test to assert the query does not include the non-existent
IssueFieldfragment. - Added a new integration test file intended to validate the discovery query against the live GitHub GraphQL API schema/query execution.
File summaries
| File | Description |
|---|---|
| actions/setup/js/set_issue_field.cjs | Removes the invalid IssueField fragment from the discovery query. |
| actions/setup/js/set_issue_field.test.cjs | Updates query-shape assertions to ensure the invalid fragment is absent. |
| actions/setup/js/set_issue_field_api_query.integration.test.cjs | Adds a live-API integration test for query validity and fragment exclusion. |
| .github/workflows/objective-impact-report.lock.yml | Updates generated workflow metadata hash (appears unrelated to this PR’s purpose). |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 3
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+49
to
+61
| const introspection = await octokit.graphql( | ||
| `query { | ||
| __type(name: "IssueField") { | ||
| name | ||
| } | ||
| }` | ||
| ); | ||
|
|
||
| expect(introspection.__type).toBeNull(); | ||
| expect(ISSUE_FIELDS_DISCOVERY_QUERY).not.toMatch(/\.\.\.\s+on\s+IssueField\s*\{/); | ||
|
|
||
| const result = await octokit.graphql(ISSUE_FIELDS_DISCOVERY_QUERY, { owner, repo }); | ||
| expect(result?.repository).toBeDefined(); |
Comment on lines
+34
to
+40
| describe("set_issue_field GraphQL discovery query integration", () => { | ||
| it("validates against live schema and excludes the removed IssueField fragment", async () => { | ||
| const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN; | ||
| if (!token) { | ||
| console.log("Skipping live GraphQL schema test - no GITHUB_TOKEN or GH_TOKEN available"); | ||
| return; | ||
| } |
Collaborator
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done in 4e8fbb7:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
set_issue_fieldfield discovery was failing at GraphQL validation because the query referenced... on IssueField, a type that is not present in the current GitHub schema. This prevented field resolution from completing before mutation execution.Query compatibility fix
... on IssueField { id name }from repository-level and organization-levelissueFieldsselections inactions/setup/js/set_issue_field.cjs.IssueFieldText,IssueFieldNumber,IssueFieldDate,IssueFieldSingleSelect,IssueFieldMultiSelect) so discovery remains schema-valid.Regression coverage
set_issue_field.test.cjsassertions to ensure the query does not include the invalidIssueFieldfragment condition.set_issue_field_api_query.integration.test.cjsto validate query execution against the live GraphQL schema. The test is wired intovitest.integration.config.mjsso it runs under the existingtest:js-integration-live-apicommand and thejs-integration-live-apiCI job.