Skip to content

Commit 8731a4c

Browse files
committed
refactor: improve code consistency in MarkPullRequestReadyForReview
- Rename 'variables' to 'vars' for consistency with other GraphQL functions - Improve comment precision for GraphQL schema requirements These changes address code style nitpicks while maintaining functionality.
1 parent 2461623 commit 8731a4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/github/pullrequests.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,13 +1655,13 @@ func MarkPullRequestReadyForReview(getGQLClient GetGQLClientFn, t translations.T
16551655
} `graphql:"repository(owner: $owner, name: $repo)"`
16561656
}
16571657

1658-
variables := map[string]any{
1658+
vars := map[string]any{
16591659
"owner": githubv4.String(params.Owner),
16601660
"repo": githubv4.String(params.Repo),
16611661
"prNum": githubv4.Int(params.PullNumber),
16621662
}
16631663

1664-
if err := client.Query(ctx, &getPullRequestQuery, variables); err != nil {
1664+
if err := client.Query(ctx, &getPullRequestQuery, vars); err != nil {
16651665
return mcp.NewToolResultError(fmt.Sprintf("failed to get pull request: %v", err)), nil
16661666
}
16671667

@@ -1674,7 +1674,7 @@ func MarkPullRequestReadyForReview(getGQLClient GetGQLClientFn, t translations.T
16741674
var markReadyForReviewMutation struct {
16751675
MarkPullRequestReadyForReview struct {
16761676
PullRequest struct {
1677-
ID githubv4.ID // We don't need this, but a selector is required or GQL complains
1677+
ID githubv4.ID // Required by GraphQL schema, but not used in response
16781678
}
16791679
} `graphql:"markPullRequestReadyForReview(input: $input)"`
16801680
}

0 commit comments

Comments
 (0)