Skip to content

Commit

Permalink
chore(ci): add authorization token for GitHub API requests; (#5442)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS authored Jan 6, 2023
1 parent 139d51f commit 145df40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/contributors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios from "../index.js";
import axios from "./githubAPI.js";
import util from "util";
import cp from "child_process";
import Handlebars from "handlebars";
Expand Down
9 changes: 9 additions & 0 deletions bin/githubAPI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import axios from '../index.js';

const {GITHUB_TOKEN} = process.env;

export default axios.create({
headers: {
Authorization: GITHUB_TOKEN ? `token ${GITHUB_TOKEN}` : null
}
})
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gulp from 'gulp';
import fs from 'fs-extra';
import axios from './index.js';
import axios from './bin/githubAPI.js';
import minimist from 'minimist'

const argv = minimist(process.argv.slice(2));
Expand Down

0 comments on commit 145df40

Please sign in to comment.