Skip to content

Commit 8e36dd3

Browse files
authored
Pass GitHub token to audit consumers script (#3155)
1 parent a361e9f commit 8e36dd3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/audit_consumers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- run: npm ci
2020
- run: npm run build
2121
- run: npm run audit-consumers --silent | tee issue-body.md
22+
env:
23+
GH_TOKEN: ${{ github.token }}
2224
- run: gh issue create --title "web-features consumers report for $(date -I)" --label generated --body-file issue-body.md
2325
env:
2426
GH_TOKEN: ${{ github.token }}

scripts/audit-consumers.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ async function chromeStatusReport(): Promise<Report> {
135135
}
136136

137137
async function wptReport(): Promise<Report> {
138-
const octokit = new Octokit();
138+
const octokit = new Octokit({
139+
auth: process.env.GH_TOKEN,
140+
});
139141

140142
const params = { owner: "web-platform-tests", repo: "wpt" };
141143
const release = await octokit.rest.repos.getLatestRelease(params);
@@ -204,4 +206,7 @@ async function main() {
204206
}
205207
}
206208

207-
main();
209+
main().catch((err) => {
210+
console.error(err);
211+
process.exit(1);
212+
});

0 commit comments

Comments
 (0)