Files
angular__angular/tools/dashboard/functions/github/github-api.ts
T
Paul Gschwendtner 7024dc49f8 chore: update dashboard functions (#9504)
* Updates the package dependencies of the Dashboard dependencies. There seem to be errors with the old `node-github` API, but updating to the latest version (`@octokit/rest`) seems to work locally.
2018-01-22 12:50:50 -08:00

12 lines
475 B
TypeScript

import {config} from 'firebase-functions';
import * as GithubApi from '@octokit/rest';
/** API token for the Github repository. Required to set the github status on commits and PRs. */
const githubAccessToken = config().secret.github;
/** Export the GitHub V3 API instance that is authenticated. */
export const githubApiV3 = new GithubApi();
// Authenticate the Github API package with the user token.
githubApiV3.authenticate({type: 'token', token: githubAccessToken});