Skip to content

Commit 7697f26

Browse files
Merge pull request #7 from santoshyadavdev/santoshyadavdev-patch-2
Update token usage
2 parents 973d17e + 0ea3b44 commit 7697f26

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

dist/index.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { Octokit } from '@octokit/rest'
88
const GH_USERNAME = core.getInput('GH_USERNAME')
99
const COMMIT_NAME = core.getInput('COMMIT_NAME')
1010
const COMMIT_EMAIL = core.getInput('COMMIT_EMAIL')
11-
const token = process.env.GITHUB_TOKEN
12-
const octokit = new Octokit({ auth: token })
11+
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
1312

1413
interface SponsoredProfile {
1514
sponsorLogin: string
@@ -46,7 +45,7 @@ async function fetchSponsoredProfiles(): Promise<SponsoredProfile[]> {
4645
const response = await graphql<any>({
4746
query,
4847
headers: {
49-
authorization: `token ${token}`
48+
authorization: `token ${process.env.GITHUB_TOKEN}`
5049
}
5150
})
5251

0 commit comments

Comments
 (0)