Files
freeCodeCamp/constants.js

27 lines
798 B
JavaScript
Raw Normal View History

2018-11-09 15:29:46 -08:00
require('dotenv').config();
2018-11-20 15:31:28 -08:00
2018-11-09 15:29:46 -08:00
const owner = process.env.REPOSITORY_OWNER;
const repo = process.env.REPOSITORY;
2018-11-06 23:04:43 -08:00
const fccBaseUrl = `https://github.com/${owner}/${repo}/`;
const prBaseUrl = `${fccBaseUrl}pull/`;
2018-11-20 15:31:28 -08:00
const octokitConfig = {
timeout: 0, // 0 means no request timeout
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit/rest.js v1.2.3' // v1.2.3 will be current version
},
// custom GitHub Enterprise URL
baseUrl: 'https://api.github.com',
// Node only: advanced request options can be passed as http(s) agent
agent: undefined
}
const octokitAuth = {
type: 'basic',
username: process.env.USERNAME,
password: process.env.ACCESS_TOKEN
};
module.exports = { owner, repo, prBaseUrl, octokitConfig, octokitAuth }