From 30b0293fe5b907add7f8fa994fc3bd2c66162ab5 Mon Sep 17 00:00:00 2001 From: 14Richa Date: Wed, 19 Jul 2023 13:52:43 +0530 Subject: [PATCH] remove ocktokit dependecy --- .github/workflows/update-maintainers.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/update-maintainers.yml b/.github/workflows/update-maintainers.yml index e437df1f..76c767b9 100644 --- a/.github/workflows/update-maintainers.yml +++ b/.github/workflows/update-maintainers.yml @@ -42,9 +42,6 @@ jobs: - name: Install js-yaml run: npm install js-yaml@3.14.1 - - name: Install @octokit/rest - run: npm install @octokit/rest - - name: Compare CODEOWNERS id: compare-codeowners env: @@ -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) { @@ -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,