Skip to content

Commit 479cd77

Browse files
Will-hxwclaude
andcommitted
fix(pull_requests): add author_association to MinimalPullRequest
Fixes Issue #2250 - REST path for pull_requests was missing AuthorAssociation field. The GraphQL path was fixed in PR #2265 but the REST path via convertToMinimalPullRequest() was not updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 3a6a6f6 commit 479cd77

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/github/minimal_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ type MinimalPullRequest struct {
262262
ClosedAt string `json:"closed_at,omitempty"`
263263
MergedAt string `json:"merged_at,omitempty"`
264264
Milestone string `json:"milestone,omitempty"`
265+
AuthorAssociation string `json:"author_association,omitempty"`
265266
}
266267

267268
// MinimalPRBranch is the trimmed output type for pull request branch references.
@@ -508,7 +509,8 @@ func convertToMinimalPullRequest(pr *github.PullRequest) MinimalPullRequest {
508509
Deletions: pr.GetDeletions(),
509510
ChangedFiles: pr.GetChangedFiles(),
510511
Commits: pr.GetCommits(),
511-
Comments: pr.GetComments(),
512+
Comments: pr.GetComments(),
513+
AuthorAssociation: pr.GetAuthorAssociation(),
512514
}
513515

514516
if pr.CreatedAt != nil {

0 commit comments

Comments
 (0)