Skip to content

Commit

Permalink
replaced octokit/request with octokit/octokit in dependency-discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
TDDR committed Apr 14, 2022
1 parent 17e421e commit a1e3dbb
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 9 deletions.
179 changes: 174 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/dependency-discovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"homepage": "https://github.com/Seneca-CDOT/telescope#readme",
"dependencies": {
"@octokit/request": "5.6.3",
"@senecacdot/satellite": "^1.27.0",
"octokit": "1.7.1",
"query-registry": "2.2.0",
"supertest": "6.1.6"
},
Expand Down
6 changes: 3 additions & 3 deletions src/api/dependency-discovery/src/github.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { request } = require('@octokit/request');

const { Octokit } = require('octokit');
// Check whether a specific time has reached the GitHub time limit.
// @param {Date} datetime - a Date object representing a moment in the past
// @returns {Boolean}
Expand All @@ -11,9 +10,10 @@ async function constructGitHubRequest(gitHubUrl) {
const labels = ['hacktoberfest', 'good first issue', 'help wanted'];

const [owner, repo] = new URL(gitHubUrl).pathname.substring(1).split('/');
const octokit = new Octokit();

const requestPromises = labels.map((label) => {
return request('GET /repos/{owner}/{repo}/issues{?assignee,state,labels}', {
return octokit.request('GET /repos/{owner}/{repo}/issues{?assignee,state,labels}', {
owner,
repo,
assignee: 'none',
Expand Down

0 comments on commit a1e3dbb

Please sign in to comment.