Skip to content

Commit

Permalink
remove ocktokit dependecy
Browse files Browse the repository at this point in the history
  • Loading branch information
14Richa committed Jul 19, 2023
1 parent cf8d9fd commit 30b0293
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/update-maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:
- name: Install js-yaml
run: npm install [email protected]

- name: Install @octokit/rest
run: npm install @octokit/rest

- name: Compare CODEOWNERS
id: compare-codeowners
env:
Expand Down Expand Up @@ -88,14 +85,6 @@ jobs:
const maintainersFile = './community/MAINTAINERS.yaml';
const maintainers = yaml.safeLoad(fs.readFileSync(maintainersFile, 'utf8'));

const { Octokit } = require("@octokit/rest");

const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
request: {
fetch: (url, options) => fetch(url, options)
}
});

// Update for added usernames
for (const username of addedUsernames) {
Expand All @@ -107,7 +96,7 @@ jobs:

const maintainer = maintainers.find(maintainer => maintainer.github === username);
if (!maintainer) {
const { data } = await octokit.users.getByUsername({ username });
const { data } = await github.rest.users.getByUsername({ username });
const twitterUsername = data.twitter_username;
maintainers.push({
github: username,
Expand Down

0 comments on commit 30b0293

Please sign in to comment.