Skip to content

Commit 38993f4

Browse files
authored
feat(site): Added GitHub token for authenticated GitHub API calls (#1963)
* Added GitHub token for authenticated GitHub API calls * fix(lint) Add semicolon * chore(fetch) Guard env variable access
1 parent 83d116a commit 38993f4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/scripts/fetch_package_names.js

+7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ function main() {
3535
function fetchPackageNames(options, cb) {
3636
const github = new GitHubApi();
3737

38+
if(process.env.GITHUB_TOKEN) {
39+
github.authenticate({
40+
type: 'token',
41+
token: process.env.GITHUB_TOKEN
42+
});
43+
}
44+
3845
// XXX: weak since this handles only one page
3946
github.repos.getForOrg({
4047
org: options.organization,

yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -7439,9 +7439,9 @@ tap-parser@^6.0.1:
74397439
js-yaml "^3.2.7"
74407440
minipass "^2.2.0"
74417441

7442-
"tap-render@github:munter/tap-render#0.1.7-patch1":
7442+
tap-render@Munter/tap-render#0.1.7-patch1:
74437443
version "0.1.7"
7444-
resolved "https://codeload.github.com/munter/tap-render/tar.gz/35bf3ac21c4fd2776d8569d5e8a1ab62df1f6d4f"
7444+
resolved "https://codeload.github.com/Munter/tap-render/tar.gz/35bf3ac21c4fd2776d8569d5e8a1ab62df1f6d4f"
74457445
dependencies:
74467446
jsonify "0.0.0"
74477447
pause-stream "0.0.7"

0 commit comments

Comments
 (0)