Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8731a4c

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 requirementsThese changes address code style nitpicks while maintaining functionality.
1 parent2461623 commit8731a4c

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-
iferr:=client.Query(ctx,&getPullRequestQuery,variables);err!=nil {
1664+
iferr:=client.Query(ctx,&getPullRequestQuery,vars);err!=nil {
16651665
returnmcp.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
varmarkReadyForReviewMutationstruct {
16751675
MarkPullRequestReadyForReviewstruct {
16761676
PullRequeststruct {
1677-
ID githubv4.ID//We don't need this, buta selector is required or GQL complains
1677+
ID githubv4.ID//Required by GraphQL schema, butnot used in response
16781678
}
16791679
}`graphql:"markPullRequestReadyForReview(input: $input)"`
16801680
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp