Improve query variable names
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
parent
81df8638cb
commit
cec2ced42f
1 changed files with 7 additions and 7 deletions
|
|
@ -716,11 +716,11 @@ type RefComparison struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ComparePullRequestBaseBranchWith(client *Client, repo ghrepo.Interface, prNumber int, headRef string) (*RefComparison, error) {
|
func ComparePullRequestBaseBranchWith(client *Client, repo ghrepo.Interface, prNumber int, headRef string) (*RefComparison, error) {
|
||||||
query := `query ComparePullRequestBaseBranchWith($owner: String!, $repo: String!, $pr_number: Int!, $head_ref: String!) {
|
query := `query ComparePullRequestBaseBranchWith($owner: String!, $repo: String!, $pr_number: Int!, $headRef: String!) {
|
||||||
repository(owner: $owner, name: $repo) {
|
repository(owner: $owner, name: $repo) {
|
||||||
pullRequest(number: $pr_number) {
|
pullRequest(number: $pullRequestNumber) {
|
||||||
baseRef {
|
baseRef {
|
||||||
compare (headRef: $head_ref) {
|
compare (headRef: $headRef) {
|
||||||
aheadBy, behindBy, status
|
aheadBy, behindBy, status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -738,10 +738,10 @@ func ComparePullRequestBaseBranchWith(client *Client, repo ghrepo.Interface, prN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
variables := map[string]interface{}{
|
variables := map[string]interface{}{
|
||||||
"owner": repo.RepoOwner(),
|
"owner": repo.RepoOwner(),
|
||||||
"repo": repo.RepoName(),
|
"repo": repo.RepoName(),
|
||||||
"pr_number": prNumber,
|
"pullRequestNumber": prNumber,
|
||||||
"head_ref": headRef,
|
"headRef": headRef,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := client.GraphQL(repo.RepoHost(), query, variables, &result); err != nil {
|
if err := client.GraphQL(repo.RepoHost(), query, variables, &result); err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue