fix: add authorAssociation to IssueFragment (GraphQL path)#2620
Open
advancedresearcharray wants to merge 1 commit into
Open
fix: add authorAssociation to IssueFragment (GraphQL path)#2620advancedresearcharray wants to merge 1 commit into
advancedresearcharray wants to merge 1 commit into
Conversation
Author
|
@SamMorrowDrums — this addresses your review feedback on #2265:
Rebased on current Ready for re-review when you have a moment. |
0b6be85 to
9a21254
Compare
Author
|
@SamMorrowDrums — rebased commits are clean (no co-author trailers). Verified locally with `script/test` on Go 1.25. This addresses your #2265 review:
CI workflows are still awaiting maintainer approval for this fork PR. Ready for re-review when you have a moment. |
c28d233 to
e9c34fc
Compare
Move authorAssociation to a top-level field on IssueFragment and LegacyIssueFragment per the GitHub GraphQL schema, populate it in fragmentToMinimalIssue conversions, and add MinimalPullRequest REST path coverage with tests. Fixes github#2250. Addresses review feedback on github#2265. Co-authored-by: Cursor <cursoragent@cursor.com>
e9c34fc to
205b993
Compare
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.
Addresses the CHANGES_REQUESTED review on #2265. The original PR placed
authorAssociationonActor.author, which does not exist in the GitHub GraphQL schema — it is a top-level field on theIssuenode.Changes
pkg/github/issues.goAuthorAssociation githubv4.StringtoIssueFragmentandLegacyIssueFragmentpkg/github/minimal_types.gofragmentToMinimalIssue()andlegacyFragmentToMinimalIssue()setAuthorAssociationfrom the top-level fieldauthor_associationtoMinimalPullRequestviaconvertToMinimalPullRequest()(Missing author_association field in list_issues and pull request responses #2250)pkg/github/issues_test.goauthorAssociationauthorAssociationpkg/github/pullrequests_test.goauthor_associationis populated inpull_request_readandlist_pull_requestsresponsesRebased on current
main.go test ./pkg/github/ -count=1passes.Fixes #2250. Supersedes #2265 (original author fork not writable).