Skip to content

Commit 54bd287

Browse files
author
advancedresearcharray
committed
fix: add authorAssociation to IssueFragment (GraphQL path)
Move authorAssociation onto the Issue GraphQL node (not Actor.author) per review feedback on #2265, populate it in fragmentToMinimalIssue and the legacy GraphQL path, and add author_association to MinimalPullRequest on the REST path (fixes #2250).
1 parent 457f599 commit 54bd287

4 files changed

Lines changed: 101 additions & 80 deletions

File tree

pkg/github/issues.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,12 @@ func mergeIssueFieldValues(existing, incoming []*github.IssueRequestFieldValue)
480480

481481
// IssueFragment represents a fragment of an issue node in the GraphQL API.
482482
type IssueFragment struct {
483-
Number githubv4.Int
484-
Title githubv4.String
485-
Body githubv4.String
486-
State githubv4.String
487-
DatabaseID int64
483+
Number githubv4.Int
484+
Title githubv4.String
485+
Body githubv4.String
486+
State githubv4.String
487+
DatabaseID int64
488+
AuthorAssociation githubv4.String
488489

489490
Author struct {
490491
Login githubv4.String
@@ -616,11 +617,12 @@ func getIssueQueryType(hasLabels bool, hasSince bool) any {
616617
// is removed.
617618

618619
type LegacyIssueFragment struct {
619-
Number githubv4.Int
620-
Title githubv4.String
621-
Body githubv4.String
622-
State githubv4.String
623-
DatabaseID int64
620+
Number githubv4.Int
621+
Title githubv4.String
622+
Body githubv4.String
623+
State githubv4.String
624+
DatabaseID int64
625+
AuthorAssociation githubv4.String
624626

625627
Author struct {
626628
Login githubv4.String

0 commit comments

Comments
 (0)