Skip to content

Commit

Permalink
Merge pull request #27 from BrownUniversity/fix/repo-id-lookup
Browse files Browse the repository at this point in the history
Use repo node_id for graphQL operations
  • Loading branch information
sumnerwarren authored Feb 24, 2023
2 parents 5879739 + a02eeb6 commit a296982
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,9 @@ function createGitHubClient(token, repo) {
return {
async getRepoData() {
const repoName = repo.substr(repo.indexOf("/") + 1);
const { id } = await octokit.repos.get({
const {
data: { node_id: repoId },
} = await octokit.repos.get({
owner: "BrownUniversity",
repo: repoName,
});
Expand All @@ -960,7 +962,7 @@ function createGitHubClient(token, repo) {
}
);
return {
repoId: id,
repoId,
issues,
};
},
Expand Down
6 changes: 4 additions & 2 deletions github.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ function createGitHubClient(token, repo) {
return {
async getRepoData() {
const repoName = repo.substr(repo.indexOf("/") + 1);
const { id } = await octokit.repos.get({
const {
data: { node_id: repoId },
} = await octokit.repos.get({
owner: "BrownUniversity",
repo: repoName,
});
Expand All @@ -18,7 +20,7 @@ function createGitHubClient(token, repo) {
}
);
return {
repoId: id,
repoId,
issues,
};
},
Expand Down

0 comments on commit a296982

Please sign in to comment.