From f996d7b7aae9059759ac55e978cff76d91853301 Mon Sep 17 00:00:00 2001 From: 0xn3va <47100179+0xn3va@users.noreply.github.com> Date: Sun, 10 Dec 2023 22:07:09 +0100 Subject: [PATCH] Fix the CollaboratorPermission GraphQL query (#301) Co-authored-by: 0xn3va <0xn3va@local> --- dist/index.js | 2 +- src/github-helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 058bbb06d..c282d9940 100644 --- a/dist/index.js +++ b/dist/index.js @@ -302,7 +302,7 @@ class GitHubHelper { // Returns 'READ', 'TRIAGE', 'WRITE', 'MAINTAIN', 'ADMIN' const query = `query CollaboratorPermission($owner: String!, $repo: String!, $collaborator: String) { repository(owner:$owner, name:$repo) { - collaborators(query: $collaborator) { + collaborators(login: $collaborator) { edges { permission } diff --git a/src/github-helper.ts b/src/github-helper.ts index 60881de4d..31b96237f 100644 --- a/src/github-helper.ts +++ b/src/github-helper.ts @@ -61,7 +61,7 @@ export class GitHubHelper { // Returns 'READ', 'TRIAGE', 'WRITE', 'MAINTAIN', 'ADMIN' const query = `query CollaboratorPermission($owner: String!, $repo: String!, $collaborator: String) { repository(owner:$owner, name:$repo) { - collaborators(query: $collaborator) { + collaborators(login: $collaborator) { edges { permission }