github-pages-deploy-action/node_modules/@actions/github/lib/github.js

36 lines
1.4 KiB
JavaScript
Raw Normal View History

2020-01-28 13:08:03 +08:00
"use strict";
2020-06-06 22:11:37 +08:00
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
2020-01-28 13:08:03 +08:00
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
2020-06-06 22:11:37 +08:00
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
2020-01-28 13:08:03 +08:00
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
2020-06-06 22:11:37 +08:00
exports.getOctokit = exports.context = void 0;
2020-01-28 13:08:03 +08:00
const Context = __importStar(require("./context"));
2020-06-06 22:11:37 +08:00
const utils_1 = require("./utils");
2020-01-28 13:08:03 +08:00
exports.context = new Context.Context();
2020-06-06 22:11:37 +08:00
/**
* Returns a hydrated octokit ready to use for GitHub Actions
*
* @param token the repo PAT or GITHUB_TOKEN
* @param options other options to set
*/
function getOctokit(token, options) {
return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
2020-01-28 13:08:03 +08:00
}
2020-06-06 22:11:37 +08:00
exports.getOctokit = getOctokit;
2020-01-28 13:08:03 +08:00
//# sourceMappingURL=github.js.map