From ff4d65db7e8c83f1aaf2d6b803d7841873f478d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 2 Mar 2024 19:40:33 +0000 Subject: [PATCH] Automatic compilation --- .github/FUNDING.yml | 1 - .github/ISSUE_TEMPLATE/meeting.md | 39 - .github/SECURITY.md | 10 - .github/workflows/release.yml | 21 - .github/workflows/test.yml | 45 - .gitignore | 3 - .npmignore | 5 - CODE_OF_CONDUCT.md | 4 - CONTRIBUTING.md | 36 - LICENSE | 10 - README.md | 109 - dist/index.js | 71020 ++++++++++++++++++++++++++++ index.js | 7 - lib/conversions.js | 81 - lib/default-notes-template.js | 29 - lib/default-template.js | 44 - lib/issues.js | 76 - lib/meetings.js | 87 - lib/notes.js | 25 - package-lock.json | 8846 ---- package.json | 37 - run.js | 152 - test/_close-issue.js | 15 - test/index.js | 20 - test/integration.js | 61 - 25 files changed, 71020 insertions(+), 9763 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/meeting.md delete mode 100644 .github/SECURITY.md delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 README.md create mode 100644 dist/index.js delete mode 100644 index.js delete mode 100644 lib/conversions.js delete mode 100644 lib/default-notes-template.js delete mode 100644 lib/default-template.js delete mode 100644 lib/issues.js delete mode 100644 lib/meetings.js delete mode 100644 lib/notes.js delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 run.js delete mode 100644 test/_close-issue.js delete mode 100644 test/index.js delete mode 100644 test/integration.js diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 55916f5..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [wesleytodd] diff --git a/.github/ISSUE_TEMPLATE/meeting.md b/.github/ISSUE_TEMPLATE/meeting.md deleted file mode 100644 index 7122465..0000000 --- a/.github/ISSUE_TEMPLATE/meeting.md +++ /dev/null @@ -1,39 +0,0 @@ -## Date/Time - -| Timezone | Date/Time | -|----------|-----------| -<%= [ - 'America/Los_Angeles', - 'America/Denver', - 'America/Chicago', - 'America/New_York', - 'Europe/London', - 'Europe/Amsterdam', - 'Europe/Moscow', - 'Asia/Kolkata', - 'Asia/Shanghai', - 'Asia/Tokyo', - 'Australia/Sydney' -].map((zone) => { - return `| ${zone} | ${date.setZone(zone).toFormat('EEE dd-MMM-yyyy HH:mm (hh:mm a)')} |` -}).join('\n') %> - -Or in your local time: -* https://www.timeanddate.com/worldclock/?iso=<%= date.toFormat("yyyy-MM-dd'T'HH:mm:ss") %> - -## Agenda - -Extracted from **<%= agendaLabel %>** labelled issues and pull requests from **<%= owner %>/<%= repo %>** prior to the meeting. - -<%= agendaIssues.map((i) => { - return `* ${i.title} [#${i.number}](${i.html_url})` -}).join('\n') %> - -## Links - -* Minutes: <%= meetingNotes || '' %> - -### Joining the meeting - -* link for participants: -* For those who just want to watch: diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index d735bf7..0000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1,10 +0,0 @@ -# Security Policy - -## Supported Versions - -This project supports security and feature development on the two most recent -major versions. It also supports all active and LTS Node.js release lines. - -## Reporting a Vulnerability - -To report a vulnerability email Wes Todd before opening public issues on the repo. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 01e9882..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release Pipeline - -on: - release: - types: [published, edited] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ github.event.release.tag_name }} - - run: npm install - - run: npm run build - - uses: JasonEtco/build-and-tag-action@v1 - with: - setup: '' - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index ae08d8f..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: test -on: - pull_request: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test - - action-in-action: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 18.x - uses: actions/setup-node@v4 - with: - node-version: 18.x - - run: npm install - - uses: ./ - id: maker - with: - token: ${{ secrets.GITHUB_TOKEN }} - schedules: 2020-04-02T17:00:00.0Z/P1D - issueTitle: 'Test Meeting <%= date.toFormat("yyyy-MM-dd") %>' - createWithin: P2D - meetingLabels: test - agendaLabel: meeting-agenda-test - createNotes: true - repos: pkgjs/meet,pkgjs/meet - orgs: pkgjs - - name: clean up issue - run: node ./test/_close-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ steps.maker.outputs.issueNumber }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2f54ef0..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -.env -dist diff --git a/.npmignore b/.npmignore deleted file mode 100644 index a344a17..0000000 --- a/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.github -dist -test -.env -.gitignore diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index eb07a97..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -# Code of Conduct - -The Node.js Code of Conduct, which applies to this project, can be found at -https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 97035e0..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,36 +0,0 @@ -# Contributing - -## Code of Conduct - -The Node.js project has a -[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md) -to which all contributors must adhere. - -See [details on our policy on Code of Conduct](https://github.com/nodejs/node/blob/master/doc/guides/contributing/code-of-conduct.md). - - -## Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index cfc08c8..0000000 --- a/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -MIT License - -Copyright (c) 2020 Contributors https://github.com/pkgjs/meet/graphs/contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md deleted file mode 100644 index e856076..0000000 --- a/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Schedule regularly occuring meetings via GitHub Issue - - -[![test](https://github.com/pkgjs/meet/workflows/test/badge.svg)](https://github.com/pkgjs/meet/actions?query=workflow%3Atest) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/standard/standard) - -Schedule meetings via a GitHub Action. Creates issues based on a schedule and template. - -This repository is managed by the [Package Maintenance Working Group](https://github.com/nodejs/package-maintenance), see [Governance](https://github.com/nodejs/package-maintenance/blob/main/Governance.md). - - -## Usage - -```yaml -name: Schedule team meetings -on: - schedule: - - cron: '0 0 * * * *' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: pkgjs/meet@v0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - schedules: 2020-04-02T17:00:00.0Z/P1D -``` - -### Inputs - -The meeting schedule, issue, etc can be configured with inouts to this action. - -- `token`: (required) The token from the action for calling to the GitHub API. -- `schedules`: (required) The ISO-8601 interval for the schedule. Default: `${now/P7D}` seven days from now -- `createWithin`: (required) The ISO-8601 duration for how soon before the meeting to create the issue. Default `P7D` -- `meetingLabels`: The labels to apply to issues generated by this GitHub Action for meetings. Default: `meeting` -- `agendaLabel`: Label to pull the agenda from. Default: `meeting-agenda` -- `issueTitle`: Template string for issue title. Default: `Meeting <%= date.toFormat('yyyy-MM-dd') %>` -- `issueTemplate`: The name of the issue template found in `.github/ISSUE_TEMPLATE`. Default: `meeting.md` - -### Default Issue Template - -The default issue template can be seen in the ISSUE_TEMPLATES directory, as [meeting.md](https://github.com/pkgjs/meet/blob/main/.github/ISSUE_TEMPLATE/meeting.md). Additionally, you can find example issues of the latest version via the closed issues that are the result of CI tests. - -Our default template is based off of the Node.js project's practices around meetings, but changes and enhancements are welcome. - - -### Custom Issue Templates - -If you don't want to use the default issue template, you can use a custom issue template by passing in the file name of it (presuming it lives in ISSUE_TEMPLATES). - -You can use both our shorthand and JavaScript in your meeting templates. - -#### Shorthand in Your Custom Meeting Templates - -We provide some shorthand that you can use in your meeting templates. We'll automatically replace the shorthand with the relevant dynamic information. - -- Title: - - Shorthand: `` - - Result: The issue's title. -- Agenda Label: - - Shorthand: `` - - Result: The label for agenda items to be pulled from that you've defined in the Action's YAML configuration. -- Invitees: - - Shorthand: `` - - Result: The list of invitees you've defined in the Action's YAML configuration. -- Observers: - - Shorthand: `` - - Result: The list of observers you've defined in the Action's YAML configuration. - -If you'd like to see more shorthand available, we absolutely welcome PRs. - -#### JavaScript in Your Custom Meeting Templates - -You can include custom JavaScript in your custom meeting templates. We use [ejs](https://ejs.co/), so anything within an ejs tag will be parsed as JavaScript. - -### JS API Usage - -The main logic of the module is also published to npm. - -``` -$ npm i @pkgjs/meet -``` - -```javascript -const maker = require('@pkgjs/meet') - -;(async () => { - const issue = await maker.meetings.createNextMeeting(client, { - owner: 'pkgjs', - repo: 'meet', - schedules: [] - }) - console.log(issue) // the response from the GitHub api creating the issue -})() -``` - -## Contributing - -This package welcomes contributions. While the basic unit tests are runnable -(`npm t`) Unfortunatly because it is requires access to the GitHub api it means -you need to have a token with access to create the issues as part of the -integration tests. To specify the key you need to create a personal access token -and put it in a `.env` file as `GITHUB_TOKEN=`. Then you can run -`npm run test:integration` to run the main integration tests. To be honest this -should probably be configurable, contributions welcome. diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..92fc229 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,71020 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 491: +/***/ ((module) => { + +"use strict"; +module.exports = require("assert"); + +/***/ }), + +/***/ 300: +/***/ ((module) => { + +"use strict"; +module.exports = require("buffer"); + +/***/ }), + +/***/ 81: +/***/ ((module) => { + +"use strict"; +module.exports = require("child_process"); + +/***/ }), + +/***/ 57: +/***/ ((module) => { + +"use strict"; +module.exports = require("constants"); + +/***/ }), + +/***/ 113: +/***/ ((module) => { + +"use strict"; +module.exports = require("crypto"); + +/***/ }), + +/***/ 361: +/***/ ((module) => { + +"use strict"; +module.exports = require("events"); + +/***/ }), + +/***/ 147: +/***/ ((module) => { + +"use strict"; +module.exports = require("fs"); + +/***/ }), + +/***/ 685: +/***/ ((module) => { + +"use strict"; +module.exports = require("http"); + +/***/ }), + +/***/ 687: +/***/ ((module) => { + +"use strict"; +module.exports = require("https"); + +/***/ }), + +/***/ 808: +/***/ ((module) => { + +"use strict"; +module.exports = require("net"); + +/***/ }), + +/***/ 37: +/***/ ((module) => { + +"use strict"; +module.exports = require("os"); + +/***/ }), + +/***/ 17: +/***/ ((module) => { + +"use strict"; +module.exports = require("path"); + +/***/ }), + +/***/ 477: +/***/ ((module) => { + +"use strict"; +module.exports = require("punycode"); + +/***/ }), + +/***/ 781: +/***/ ((module) => { + +"use strict"; +module.exports = require("stream"); + +/***/ }), + +/***/ 576: +/***/ ((module) => { + +"use strict"; +module.exports = require("string_decoder"); + +/***/ }), + +/***/ 404: +/***/ ((module) => { + +"use strict"; +module.exports = require("tls"); + +/***/ }), + +/***/ 310: +/***/ ((module) => { + +"use strict"; +module.exports = require("url"); + +/***/ }), + +/***/ 837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); + +/***/ }), + +/***/ 796: +/***/ ((module) => { + +"use strict"; +module.exports = require("zlib"); + +/***/ }), + +/***/ 723: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +__nccwpck_require__(214);/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 87351: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +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; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require2_(22037)); +const utils_1 = __nccwpck_require2_(5278); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 42186: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +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; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require2_(87351); +const file_command_1 = __nccwpck_require2_(717); +const utils_1 = __nccwpck_require2_(5278); +const os = __importStar(__nccwpck_require2_(22037)); +const path = __importStar(__nccwpck_require2_(71017)); +const oidc_utils_1 = __nccwpck_require2_(98041); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + } + command_1.issueCommand('set-env', { name }, convertedVal); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueFileCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require2_(81327); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require2_(81327); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require2_(2981); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +// For internal use, subject to change. +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; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(__nccwpck_require2_(57147)); +const os = __importStar(__nccwpck_require2_(22037)); +const uuid_1 = __nccwpck_require2_(75840); +const utils_1 = __nccwpck_require2_(5278); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; +//# sourceMappingURL=file-command.js.map + +/***/ }), + +/***/ 98041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require2_(11404); +const auth_1 = __nccwpck_require2_(36758); +const core_1 = __nccwpck_require2_(42186); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 2981: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +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; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require2_(71017)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 81327: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require2_(22037); +const fs_1 = __nccwpck_require2_(57147); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 5278: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 36758: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 11404: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +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; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require2_(13685)); +const https = __importStar(__nccwpck_require2_(95687)); +const pm = __importStar(__nccwpck_require2_(72843)); +const tunnel = __importStar(__nccwpck_require2_(74294)); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 72843: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map + +/***/ }), + +/***/ 74087: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __nccwpck_require2_(57147); +const os_1 = __nccwpck_require2_(22037); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + } + else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + return { owner, repo }; + } + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map + +/***/ }), + +/***/ 95438: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require2_) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts +const graphql_1 = __nccwpck_require2_(88467); +const rest_1 = __nccwpck_require2_(29351); +const Context = __importStar(__nccwpck_require2_(74087)); +const httpClient = __importStar(__nccwpck_require2_(39925)); +// We need this in order to extend Octokit +rest_1.Octokit.prototype = new rest_1.Octokit(); +exports.context = new Context.Context(); +class GitHub extends rest_1.Octokit { + constructor(token, opts) { + super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts))); + this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts)); + } + /** + * Disambiguates the constructor overload parameters + */ + static disambiguate(token, opts) { + return [ + typeof token === 'string' ? token : '', + typeof token === 'object' ? token : opts || {} + ]; + } + static getOctokitOptions(args) { + const token = args[0]; + const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller + // Auth + const auth = GitHub.getAuthString(token, options); + if (auth) { + options.auth = auth; + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { + // Shallow clone - don't mutate the object provided by the caller + options.request = options.request ? Object.assign({}, options.request) : {}; + // Set the agent + options.request.agent = agent; + } + return options; + } + static getGraphQL(args) { + const defaults = {}; + const token = args[0]; + const options = args[1]; + // Authorization + const auth = this.getAuthString(token, options); + if (auth) { + defaults.headers = { + authorization: auth + }; + } + // Proxy + const agent = GitHub.getProxyAgent(options); + if (agent) { + defaults.request = { agent }; + } + return graphql_1.graphql.defaults(defaults); + } + static getAuthString(token, options) { + // Validate args + if (!token && !options.auth) { + throw new Error('Parameter token or opts.auth is required'); + } + else if (token && options.auth) { + throw new Error('Parameters token and opts.auth may not both be specified'); + } + return typeof options.auth === 'string' ? options.auth : `token ${token}`; + } + static getProxyAgent(options) { + var _a; + if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) { + const serverUrl = 'https://api.github.com'; + if (httpClient.getProxyUrl(serverUrl)) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(serverUrl); + } + } + return undefined; + } +} +exports.GitHub = GitHub; +//# sourceMappingURL=github.js.map + +/***/ }), + +/***/ 39925: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const http = __nccwpck_require2_(13685); +const https = __nccwpck_require2_(95687); +const pm = __nccwpck_require2_(16443); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + let parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol == 'https:' && + parsedUrl.protocol != parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (let header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof data === 'string') { + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach(handler => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __nccwpck_require2_(74294); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, + host: proxyUrl.hostname, + port: proxyUrl.port + } + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = 'Failed request: (' + statusCode + ')'; + } + let err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; + + +/***/ }), + +/***/ 16443: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + if (proxyVar) { + proxyUrl = new URL(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; + + +/***/ }), + +/***/ 27533: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require2_(4351); +const cheerio_1 = tslib_1.__importDefault(__nccwpck_require2_(63094)); +const fs = tslib_1.__importStar(__nccwpck_require2_(5630)); +const os_1 = __nccwpck_require2_(22037); +const path = tslib_1.__importStar(__nccwpck_require2_(71017)); +const node_fetch_1 = tslib_1.__importDefault(__nccwpck_require2_(80467)); +const tough = __nccwpck_require2_(47372); +const tough_cookie_filestore_1 = tslib_1.__importDefault(__nccwpck_require2_(37910)); +const url = tslib_1.__importStar(__nccwpck_require2_(57310)); +const utils_1 = __nccwpck_require2_(69842); +let version = ''; +try { + version = (__nccwpck_require2_(46336)/* .version */ .i8); +} +catch (err) { } +const defaultCookiePath = path.join(os_1.homedir(), '.hackmd', 'cookies.json'); +const defaultConfig = { + cookiePath: defaultCookiePath, + serverUrl: 'https://hackmd.io', + enterprise: true +}; +function encodeFormComponent(form) { + return Object.entries(form).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join('&'); +} +var ExportType; +(function (ExportType) { + ExportType[ExportType["PDF"] = 0] = "PDF"; + ExportType[ExportType["SLIDE"] = 1] = "SLIDE"; + ExportType[ExportType["MD"] = 2] = "MD"; + ExportType[ExportType["HTML"] = 3] = "HTML"; +})(ExportType = exports.ExportType || (exports.ExportType = {})); +/** + * codimd API Client + */ +class API { + constructor(config = {}) { + const { serverUrl, cookiePath, enterprise } = utils_1.defaults(config, defaultConfig); + fs.ensureFileSync(cookiePath); + const jar = new tough_cookie_filestore_1.default(cookiePath); + const fetch = __nccwpck_require2_(70295)(node_fetch_1.default, new tough.CookieJar(jar)); + this._fetch = fetch; + this.serverUrl = serverUrl; + this.enterprise = enterprise; + } + async login(email, password) { + await this.fetch(`${this.serverUrl}/login`, { + method: 'post', + body: encodeFormComponent({ email, password }), + headers: await this.wrapHeaders({ + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + }) + }); + } + async loginLdap(username, password) { + await this.fetch(`${this.serverUrl}/auth/ldap`, { + method: 'post', + body: encodeFormComponent({ username, password }), + headers: await this.wrapHeaders({ + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + }) + }); + } + async logout() { + const response = await this.fetch(`${this.serverUrl}/logout`, { + method: this.enterprise ? 'POST' : 'GET', + headers: await this.wrapHeaders({ + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', + }) + }); + return response.status === 200; + } + async isLogin() { + try { + const data = await this.getMe(); + return data.status === 'ok'; + } + catch (err) { + return false; + } + } + async getMe() { + const response = await this.fetch(`${this.serverUrl}/me`, this.defaultFetchOptions); + return response.json(); + } + async getHistory() { + const response = await this.fetch(`${this.serverUrl}/history`, this.defaultFetchOptions); + return response.json(); + } + async newNote(body, options) { + let response; + if (this.enterprise) { + let newNoteUrl; + if (options === null || options === void 0 ? void 0 : options.team) { + newNoteUrl = `${this.serverUrl}/team/${options.team}/new`; + } + else { + newNoteUrl = `${this.serverUrl}/new`; + } + response = await this.fetch(newNoteUrl, { + method: 'POST', + body: encodeFormComponent({ content: body }), + headers: await this.wrapHeaders({ + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', + }) + }); + } + else { + const contentType = 'text/markdown;charset=UTF-8'; + response = await this.fetch(`${this.serverUrl}/new`, { + method: 'POST', + body, + headers: await this.wrapHeaders({ + 'Content-Type': contentType + }) + }); + } + if (response.status === 200) { + return response.url; + } + else { + throw new Error('Create note failed'); + } + } + async exportRes(noteId, type) { + let res; + switch (type) { + case ExportType.PDF: + res = await this.fetch(`${this.serverUrl}/${noteId}/pdf`, this.defaultFetchOptions); + break; + case ExportType.HTML: + res = await this.fetch(`${this.serverUrl}/s/${noteId}`, this.defaultFetchOptions); + break; + case ExportType.SLIDE: + res = await this.fetch(`${this.serverUrl}/${noteId}/slide`, this.defaultFetchOptions); + break; + case ExportType.MD: + default: + res = await this.fetch(`${this.serverUrl}/${noteId}/download`, this.defaultFetchOptions); + } + return res; + } + async exportString(noteId, type) { + const res = await this.exportRes(noteId, type); + return res.text(); + } + async exportStream(noteId, type) { + const res = await this.exportRes(noteId, type); + return res.body; + } + async getTeams() { + let data; + try { + data = await this.getMe(); + } + catch (err) { + return []; + } + return data.teams || []; + } + get fetch() { + return this._fetch; + } + get domain() { + return url.parse(this.serverUrl).host; + } + get defaultFetchOptions() { + return { + headers: { + 'User-Agent': `HackMD API Client ${version} Node.js` + } + }; + } + async wrapHeaders(headers) { + if (this.enterprise) { + const csrf = await this.loadCSRFToken(); + return Object.assign(Object.assign({}, headers), { 'User-Agent': `HackMD API Client ${version} Node.js`, 'X-XSRF-Token': csrf }); + } + else { + return Object.assign(Object.assign({}, headers), { 'User-Agent': `HackMD API Client ${version} Node.js` }); + } + } + async loadCSRFToken() { + const html = await this.fetch(`${this.serverUrl}`).then(r => r.text()); + const $ = cheerio_1.default.load(html); + return $('meta[name="csrf-token"]').attr('content') || ''; + } +} +exports["default"] = API; + + +/***/ }), + +/***/ 69842: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function defaults(defaultObject, ...mergeObjects) { + return mergeObjects.reduce((acc, cur) => { + return Object.entries(cur).reduce((accc, [key, value]) => { + if (typeof accc[key] === 'undefined') { + return Object.assign(Object.assign({}, accc), { [key]: value }); + } + else { + return accc; + } + }, Object.assign({}, acc)); + }, Object.assign({}, defaultObject)); +} +exports.defaults = defaults; + + +/***/ }), + +/***/ 40334: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +async function auth(token) { + const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth"; + return { + type: "token", + token: token, + tokenType + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; + +exports.createTokenAuth = createTokenAuth; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 59440: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var isPlainObject = _interopDefault(__nccwpck_require2_(48840)); +var universalUserAgent = __nccwpck_require2_(11292); + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten + + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + + if (names.length === 0) { + return url; + } + + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; + +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} + +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + + if (!matches) { + return []; + } + + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + + return part; + }).join(""); +} + +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} + +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} + +function isDefined(value) { + return value !== undefined && value !== null; +} + +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} + +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + + return result; +} + +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} + +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + + if (operator && operator !== "+") { + var separator = ","; + + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible + + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later + + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); + + if (!isBinaryRequset) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + } + + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + + + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } else { + headers["content-length"] = 0; + } + } + } // default content-type for JSON if body is set + + + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + + + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } // Only return body/request keys if present + + + return Object.assign({ + method, + url, + headers + }, typeof body !== "undefined" ? { + body + } : null, options.request ? { + request: options.request + } : null); +} + +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} + +const VERSION = "6.0.0"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. + +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 11292: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(__nccwpck_require2_(54824)); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + return ""; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 88467: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var request = __nccwpck_require2_(36234); +var universalUserAgent = __nccwpck_require2_(45030); + +const VERSION = "4.3.1"; + +class GraphqlError extends Error { + constructor(request, response) { + const message = response.data.errors[0].message; + super(message); + Object.assign(this, response.data); + this.name = "GraphqlError"; + this.request = request; // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + +} + +const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query"]; +function graphql(request, query, options) { + options = typeof query === "string" ? options = Object.assign({ + query + }, options) : options = query; + const requestOptions = Object.keys(options).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = options[key]; + return result; + } + + if (!result.variables) { + result.variables = {}; + } + + result.variables[key] = options[key]; + return result; + }, {}); + return request(requestOptions).then(response => { + if (response.data.errors) { + throw new GraphqlError(requestOptions, { + data: response.data + }); + } + + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.request.endpoint + }); +} + +const graphql$1 = withDefaults(request.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} + +exports.graphql = graphql$1; +exports.withCustomRequest = withCustomRequest; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 64193: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const VERSION = "1.1.2"; + +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint: + * + * - https://developer.github.com/v3/search/#example (key `items`) + * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) + * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) + * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) + * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. For the exceptions with the namespace, a fallback check for the route + * paths has to be added in order to normalize the response. We cannot check for the total_count + * property because it also exists in the response of Get the combined status for a specific ref. + */ +const REGEX = [/^\/search\//, /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/, /^\/installation\/repositories([^/]|$)/, /^\/user\/installations([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/]; +function normalizePaginatedListResponse(octokit, url, response) { + const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, ""); + const responseNeedsNormalization = REGEX.find(regex => regex.test(path)); + if (!responseNeedsNormalization) return; // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + + response.data.total_count = totalCount; + Object.defineProperty(response.data, namespaceKey, { + get() { + octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"`); + return Array.from(data); + } + + }); +} + +function iterator(octokit, route, parameters) { + const options = octokit.request.endpoint(route, parameters); + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + next() { + if (!url) { + return Promise.resolve({ + done: true + }); + } + + return octokit.request({ + method, + url, + headers + }).then(response => { + normalizePaginatedListResponse(octokit, url, response); // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + + url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { + value: response + }; + }); + } + + }) + }; +} + +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } + + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} + +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then(result => { + if (result.done) { + return results; + } + + let earlyExit = false; + + function done() { + earlyExit = true; + } + + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); + + if (earlyExit) { + return results; + } + + return gather(octokit, results, iterator, mapFn); + }); +} + +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ + +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; + +exports.paginateRest = paginateRest; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 68883: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const VERSION = "1.0.0"; + +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ + +function requestLog(octokit) { + octokit.hook.wrap("request", (request, options) => { + octokit.log.debug("request", options); + const start = Date.now(); + const requestOptions = octokit.request.endpoint.parse(options); + const path = requestOptions.url.replace(options.baseUrl, ""); + return request(options).then(response => { + octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`); + return response; + }).catch(error => { + octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`); + throw error; + }); + }); +} +requestLog.VERSION = VERSION; + +exports.requestLog = requestLog; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 83044: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var deprecation = __nccwpck_require2_(58932); + +var endpointsByScope = { + actions: { + cancelWorkflowRun: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/cancel" + }, + createOrUpdateSecretForRepo: { + method: "PUT", + params: { + encrypted_value: { + type: "string" + }, + key_id: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + createRegistrationToken: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/registration-token" + }, + createRemoveToken: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/remove-token" + }, + deleteArtifact: { + method: "DELETE", + params: { + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id" + }, + deleteSecretFromRepo: { + method: "DELETE", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + downloadArtifact: { + method: "GET", + params: { + archive_format: { + required: true, + type: "string" + }, + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format" + }, + getArtifact: { + method: "GET", + params: { + artifact_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/artifacts/:artifact_id" + }, + getPublicKey: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/public-key" + }, + getSecret: { + method: "GET", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets/:name" + }, + getSelfHostedRunner: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + runner_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runners/:runner_id" + }, + getWorkflow: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + workflow_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/workflows/:workflow_id" + }, + getWorkflowJob: { + method: "GET", + params: { + job_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/jobs/:job_id" + }, + getWorkflowRun: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id" + }, + listDownloadsForSelfHostedRunnerApplication: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners/downloads" + }, + listJobsForWorkflowRun: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/jobs" + }, + listRepoWorkflowRuns: { + method: "GET", + params: { + actor: { + type: "string" + }, + branch: { + type: "string" + }, + event: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["completed", "status", "conclusion"], + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runs" + }, + listRepoWorkflows: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/workflows" + }, + listSecretsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/secrets" + }, + listSelfHostedRunnersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/runners" + }, + listWorkflowJobLogs: { + method: "GET", + params: { + job_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/actions/jobs/:job_id/logs" + }, + listWorkflowRunArtifacts: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/artifacts" + }, + listWorkflowRunLogs: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/logs" + }, + listWorkflowRuns: { + method: "GET", + params: { + actor: { + type: "string" + }, + branch: { + type: "string" + }, + event: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["completed", "status", "conclusion"], + type: "string" + }, + workflow_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/workflows/:workflow_id/runs" + }, + reRunWorkflow: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + run_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runs/:run_id/rerun" + }, + removeSelfHostedRunner: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + runner_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/actions/runners/:runner_id" + } + }, + activity: { + checkStarringRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + }, + deleteRepoSubscription: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + deleteThreadSubscription: { + method: "DELETE", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + getRepoSubscription: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + getThread: { + method: "GET", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id" + }, + getThreadSubscription: { + method: "GET", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + listEventsForOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events/orgs/:org" + }, + listEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events" + }, + listFeeds: { + method: "GET", + params: {}, + url: "/feeds" + }, + listNotifications: { + method: "GET", + params: { + all: { + type: "boolean" + }, + before: { + type: "string" + }, + page: { + type: "integer" + }, + participating: { + type: "boolean" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/notifications" + }, + listNotificationsForRepo: { + method: "GET", + params: { + all: { + type: "boolean" + }, + before: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + participating: { + type: "boolean" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + } + }, + url: "/repos/:owner/:repo/notifications" + }, + listPublicEvents: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/events" + }, + listPublicEventsForOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/events" + }, + listPublicEventsForRepoNetwork: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/networks/:owner/:repo/events" + }, + listPublicEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/events/public" + }, + listReceivedEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/received_events" + }, + listReceivedPublicEventsForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/received_events/public" + }, + listRepoEvents: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/events" + }, + listReposStarredByAuthenticatedUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/user/starred" + }, + listReposStarredByUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/starred" + }, + listReposWatchedByUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/subscriptions" + }, + listStargazersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stargazers" + }, + listWatchedReposForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/subscriptions" + }, + listWatchersForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/subscribers" + }, + markAsRead: { + method: "PUT", + params: { + last_read_at: { + type: "string" + } + }, + url: "/notifications" + }, + markNotificationsAsReadForRepo: { + method: "PUT", + params: { + last_read_at: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/notifications" + }, + markThreadAsRead: { + method: "PATCH", + params: { + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id" + }, + setRepoSubscription: { + method: "PUT", + params: { + ignored: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + subscribed: { + type: "boolean" + } + }, + url: "/repos/:owner/:repo/subscription" + }, + setThreadSubscription: { + method: "PUT", + params: { + ignored: { + type: "boolean" + }, + thread_id: { + required: true, + type: "integer" + } + }, + url: "/notifications/threads/:thread_id/subscription" + }, + starRepo: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + }, + unstarRepo: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/user/starred/:owner/:repo" + } + }, + apps: { + addRepoToInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "PUT", + params: { + installation_id: { + required: true, + type: "integer" + }, + repository_id: { + required: true, + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories/:repository_id" + }, + checkAccountIsAssociatedWithAny: { + method: "GET", + params: { + account_id: { + required: true, + type: "integer" + } + }, + url: "/marketplace_listing/accounts/:account_id" + }, + checkAccountIsAssociatedWithAnyStubbed: { + method: "GET", + params: { + account_id: { + required: true, + type: "integer" + } + }, + url: "/marketplace_listing/stubbed/accounts/:account_id" + }, + checkAuthorization: { + deprecated: "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization", + method: "GET", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + checkToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "POST", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + createContentAttachment: { + headers: { + accept: "application/vnd.github.corsair-preview+json" + }, + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + content_reference_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/content_references/:content_reference_id/attachments" + }, + createFromManifest: { + headers: { + accept: "application/vnd.github.fury-preview+json" + }, + method: "POST", + params: { + code: { + required: true, + type: "string" + } + }, + url: "/app-manifests/:code/conversions" + }, + createInstallationToken: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "POST", + params: { + installation_id: { + required: true, + type: "integer" + }, + permissions: { + type: "object" + }, + repository_ids: { + type: "integer[]" + } + }, + url: "/app/installations/:installation_id/access_tokens" + }, + deleteAuthorization: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "DELETE", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grant" + }, + deleteInstallation: { + headers: { + accept: "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" + }, + method: "DELETE", + params: { + installation_id: { + required: true, + type: "integer" + } + }, + url: "/app/installations/:installation_id" + }, + deleteToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "DELETE", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + findOrgInstallation: { + deprecated: "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/installation" + }, + findRepoInstallation: { + deprecated: "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/installation" + }, + findUserInstallation: { + deprecated: "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/installation" + }, + getAuthenticated: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: {}, + url: "/app" + }, + getBySlug: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + app_slug: { + required: true, + type: "string" + } + }, + url: "/apps/:app_slug" + }, + getInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + installation_id: { + required: true, + type: "integer" + } + }, + url: "/app/installations/:installation_id" + }, + getOrgInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/installation" + }, + getRepoInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/installation" + }, + getUserInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/installation" + }, + listAccountsUserOrOrgOnPlan: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + plan_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/marketplace_listing/plans/:plan_id/accounts" + }, + listAccountsUserOrOrgOnPlanStubbed: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + plan_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/marketplace_listing/stubbed/plans/:plan_id/accounts" + }, + listInstallationReposForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + installation_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories" + }, + listInstallations: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/app/installations" + }, + listInstallationsForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/installations" + }, + listMarketplacePurchasesForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/marketplace_purchases" + }, + listMarketplacePurchasesForAuthenticatedUserStubbed: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/marketplace_purchases/stubbed" + }, + listPlans: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/marketplace_listing/plans" + }, + listPlansStubbed: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/marketplace_listing/stubbed/plans" + }, + listRepos: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/installation/repositories" + }, + removeRepoFromInstallation: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "DELETE", + params: { + installation_id: { + required: true, + type: "integer" + }, + repository_id: { + required: true, + type: "integer" + } + }, + url: "/user/installations/:installation_id/repositories/:repository_id" + }, + resetAuthorization: { + deprecated: "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization", + method: "POST", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + resetToken: { + headers: { + accept: "application/vnd.github.doctor-strange-preview+json" + }, + method: "PATCH", + params: { + access_token: { + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/token" + }, + revokeAuthorizationForApplication: { + deprecated: "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeGrantForApplication: { + deprecated: "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grants/:access_token" + }, + revokeInstallationToken: { + headers: { + accept: "application/vnd.github.gambit-preview+json" + }, + method: "DELETE", + params: {}, + url: "/installation/token" + } + }, + checks: { + create: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + actions: { + type: "object[]" + }, + "actions[].description": { + required: true, + type: "string" + }, + "actions[].identifier": { + required: true, + type: "string" + }, + "actions[].label": { + required: true, + type: "string" + }, + completed_at: { + type: "string" + }, + conclusion: { + enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"], + type: "string" + }, + details_url: { + type: "string" + }, + external_id: { + type: "string" + }, + head_sha: { + required: true, + type: "string" + }, + name: { + required: true, + type: "string" + }, + output: { + type: "object" + }, + "output.annotations": { + type: "object[]" + }, + "output.annotations[].annotation_level": { + enum: ["notice", "warning", "failure"], + required: true, + type: "string" + }, + "output.annotations[].end_column": { + type: "integer" + }, + "output.annotations[].end_line": { + required: true, + type: "integer" + }, + "output.annotations[].message": { + required: true, + type: "string" + }, + "output.annotations[].path": { + required: true, + type: "string" + }, + "output.annotations[].raw_details": { + type: "string" + }, + "output.annotations[].start_column": { + type: "integer" + }, + "output.annotations[].start_line": { + required: true, + type: "integer" + }, + "output.annotations[].title": { + type: "string" + }, + "output.images": { + type: "object[]" + }, + "output.images[].alt": { + required: true, + type: "string" + }, + "output.images[].caption": { + type: "string" + }, + "output.images[].image_url": { + required: true, + type: "string" + }, + "output.summary": { + required: true, + type: "string" + }, + "output.text": { + type: "string" + }, + "output.title": { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + started_at: { + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs" + }, + createSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + head_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites" + }, + get: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_run_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id" + }, + getSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_suite_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id" + }, + listAnnotations: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_run_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id/annotations" + }, + listForRef: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_name: { + type: "string" + }, + filter: { + enum: ["latest", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/check-runs" + }, + listForSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + check_name: { + type: "string" + }, + check_suite_id: { + required: true, + type: "integer" + }, + filter: { + enum: ["latest", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs" + }, + listSuitesForRef: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "GET", + params: { + app_id: { + type: "integer" + }, + check_name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/check-suites" + }, + rerequestSuite: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "POST", + params: { + check_suite_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest" + }, + setSuitesPreferences: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "PATCH", + params: { + auto_trigger_checks: { + type: "object[]" + }, + "auto_trigger_checks[].app_id": { + required: true, + type: "integer" + }, + "auto_trigger_checks[].setting": { + required: true, + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/check-suites/preferences" + }, + update: { + headers: { + accept: "application/vnd.github.antiope-preview+json" + }, + method: "PATCH", + params: { + actions: { + type: "object[]" + }, + "actions[].description": { + required: true, + type: "string" + }, + "actions[].identifier": { + required: true, + type: "string" + }, + "actions[].label": { + required: true, + type: "string" + }, + check_run_id: { + required: true, + type: "integer" + }, + completed_at: { + type: "string" + }, + conclusion: { + enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"], + type: "string" + }, + details_url: { + type: "string" + }, + external_id: { + type: "string" + }, + name: { + type: "string" + }, + output: { + type: "object" + }, + "output.annotations": { + type: "object[]" + }, + "output.annotations[].annotation_level": { + enum: ["notice", "warning", "failure"], + required: true, + type: "string" + }, + "output.annotations[].end_column": { + type: "integer" + }, + "output.annotations[].end_line": { + required: true, + type: "integer" + }, + "output.annotations[].message": { + required: true, + type: "string" + }, + "output.annotations[].path": { + required: true, + type: "string" + }, + "output.annotations[].raw_details": { + type: "string" + }, + "output.annotations[].start_column": { + type: "integer" + }, + "output.annotations[].start_line": { + required: true, + type: "integer" + }, + "output.annotations[].title": { + type: "string" + }, + "output.images": { + type: "object[]" + }, + "output.images[].alt": { + required: true, + type: "string" + }, + "output.images[].caption": { + type: "string" + }, + "output.images[].image_url": { + required: true, + type: "string" + }, + "output.summary": { + required: true, + type: "string" + }, + "output.text": { + type: "string" + }, + "output.title": { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + started_at: { + type: "string" + }, + status: { + enum: ["queued", "in_progress", "completed"], + type: "string" + } + }, + url: "/repos/:owner/:repo/check-runs/:check_run_id" + } + }, + codesOfConduct: { + getConductCode: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: { + key: { + required: true, + type: "string" + } + }, + url: "/codes_of_conduct/:key" + }, + getForRepo: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/community/code_of_conduct" + }, + listConductCodes: { + headers: { + accept: "application/vnd.github.scarlet-witch-preview+json" + }, + method: "GET", + params: {}, + url: "/codes_of_conduct" + } + }, + emojis: { + get: { + method: "GET", + params: {}, + url: "/emojis" + } + }, + gists: { + checkIsStarred: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" + }, + create: { + method: "POST", + params: { + description: { + type: "string" + }, + files: { + required: true, + type: "object" + }, + "files.content": { + type: "string" + }, + public: { + type: "boolean" + } + }, + url: "/gists" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments" + }, + delete: { + method: "DELETE", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments/:comment_id" + }, + fork: { + method: "POST", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/forks" + }, + get: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments/:comment_id" + }, + getRevision: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/:sha" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists" + }, + listComments: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/comments" + }, + listCommits: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/commits" + }, + listForks: { + method: "GET", + params: { + gist_id: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/gists/:gist_id/forks" + }, + listPublic: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists/public" + }, + listPublicForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/gists" + }, + listStarred: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/gists/starred" + }, + star: { + method: "PUT", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" + }, + unstar: { + method: "DELETE", + params: { + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/star" + }, + update: { + method: "PATCH", + params: { + description: { + type: "string" + }, + files: { + type: "object" + }, + "files.content": { + type: "string" + }, + "files.filename": { + type: "string" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + gist_id: { + required: true, + type: "string" + } + }, + url: "/gists/:gist_id/comments/:comment_id" + } + }, + git: { + createBlob: { + method: "POST", + params: { + content: { + required: true, + type: "string" + }, + encoding: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/blobs" + }, + createCommit: { + method: "POST", + params: { + author: { + type: "object" + }, + "author.date": { + type: "string" + }, + "author.email": { + type: "string" + }, + "author.name": { + type: "string" + }, + committer: { + type: "object" + }, + "committer.date": { + type: "string" + }, + "committer.email": { + type: "string" + }, + "committer.name": { + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + parents: { + required: true, + type: "string[]" + }, + repo: { + required: true, + type: "string" + }, + signature: { + type: "string" + }, + tree: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/commits" + }, + createRef: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs" + }, + createTag: { + method: "POST", + params: { + message: { + required: true, + type: "string" + }, + object: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag: { + required: true, + type: "string" + }, + tagger: { + type: "object" + }, + "tagger.date": { + type: "string" + }, + "tagger.email": { + type: "string" + }, + "tagger.name": { + type: "string" + }, + type: { + enum: ["commit", "tree", "blob"], + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/tags" + }, + createTree: { + method: "POST", + params: { + base_tree: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tree: { + required: true, + type: "object[]" + }, + "tree[].content": { + type: "string" + }, + "tree[].mode": { + enum: ["100644", "100755", "040000", "160000", "120000"], + type: "string" + }, + "tree[].path": { + type: "string" + }, + "tree[].sha": { + allowNull: true, + type: "string" + }, + "tree[].type": { + enum: ["blob", "tree", "commit"], + type: "string" + } + }, + url: "/repos/:owner/:repo/git/trees" + }, + deleteRef: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:ref" + }, + getBlob: { + method: "GET", + params: { + file_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/blobs/:file_sha" + }, + getCommit: { + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/commits/:commit_sha" + }, + getRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/ref/:ref" + }, + getTag: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag_sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/tags/:tag_sha" + }, + getTree: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + recursive: { + enum: ["1"], + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + tree_sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/trees/:tree_sha" + }, + listMatchingRefs: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/matching-refs/:ref" + }, + listRefs: { + method: "GET", + params: { + namespace: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:namespace" + }, + updateRef: { + method: "PATCH", + params: { + force: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/git/refs/:ref" + } + }, + gitignore: { + getTemplate: { + method: "GET", + params: { + name: { + required: true, + type: "string" + } + }, + url: "/gitignore/templates/:name" + }, + listTemplates: { + method: "GET", + params: {}, + url: "/gitignore/templates" + } + }, + interactions: { + addOrUpdateRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "PUT", + params: { + limit: { + enum: ["existing_users", "contributors_only", "collaborators_only"], + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + addOrUpdateRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "PUT", + params: { + limit: { + enum: ["existing_users", "contributors_only", "collaborators_only"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + }, + getRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + getRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + }, + removeRestrictionsForOrg: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "DELETE", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/interaction-limits" + }, + removeRestrictionsForRepo: { + headers: { + accept: "application/vnd.github.sombra-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/interaction-limits" + } + }, + issues: { + addAssignees: { + method: "POST", + params: { + assignees: { + type: "string[]" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + addLabels: { + method: "POST", + params: { + issue_number: { + required: true, + type: "integer" + }, + labels: { + required: true, + type: "string[]" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + checkAssignee: { + method: "GET", + params: { + assignee: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/assignees/:assignee" + }, + create: { + method: "POST", + params: { + assignee: { + type: "string" + }, + assignees: { + type: "string[]" + }, + body: { + type: "string" + }, + labels: { + type: "string[]" + }, + milestone: { + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/comments" + }, + createLabel: { + method: "POST", + params: { + color: { + required: true, + type: "string" + }, + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels" + }, + createMilestone: { + method: "POST", + params: { + description: { + type: "string" + }, + due_on: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + deleteLabel: { + method: "DELETE", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:name" + }, + deleteMilestone: { + method: "DELETE", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + }, + get: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + getEvent: { + method: "GET", + params: { + event_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/events/:event_id" + }, + getLabel: { + method: "GET", + params: { + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:name" + }, + getMilestone: { + method: "GET", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + }, + list: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/issues" + }, + listAssignees: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/assignees" + }, + listComments: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/comments" + }, + listCommentsForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments" + }, + listEvents: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/events" + }, + listEventsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/events" + }, + listEventsForTimeline: { + headers: { + accept: "application/vnd.github.mockingbird-preview+json" + }, + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/timeline" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/user/issues" + }, + listForOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + filter: { + enum: ["assigned", "created", "mentioned", "subscribed", "all"], + type: "string" + }, + labels: { + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/orgs/:org/issues" + }, + listForRepo: { + method: "GET", + params: { + assignee: { + type: "string" + }, + creator: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + labels: { + type: "string" + }, + mentioned: { + type: "string" + }, + milestone: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated", "comments"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/issues" + }, + listLabelsForMilestone: { + method: "GET", + params: { + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number/labels" + }, + listLabelsForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels" + }, + listLabelsOnIssue: { + method: "GET", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + listMilestonesForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["due_on", "completeness"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones" + }, + lock: { + method: "PUT", + params: { + issue_number: { + required: true, + type: "integer" + }, + lock_reason: { + enum: ["off-topic", "too heated", "resolved", "spam"], + type: "string" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/lock" + }, + removeAssignees: { + method: "DELETE", + params: { + assignees: { + type: "string[]" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/assignees" + }, + removeLabel: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + name: { + required: true, + type: "string" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels/:name" + }, + removeLabels: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + replaceLabels: { + method: "PUT", + params: { + issue_number: { + required: true, + type: "integer" + }, + labels: { + type: "string[]" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/labels" + }, + unlock: { + method: "DELETE", + params: { + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/lock" + }, + update: { + method: "PATCH", + params: { + assignee: { + type: "string" + }, + assignees: { + type: "string[]" + }, + body: { + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + labels: { + type: "string[]" + }, + milestone: { + allowNull: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id" + }, + updateLabel: { + method: "PATCH", + params: { + color: { + type: "string" + }, + current_name: { + required: true, + type: "string" + }, + description: { + type: "string" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/labels/:current_name" + }, + updateMilestone: { + method: "PATCH", + params: { + description: { + type: "string" + }, + due_on: { + type: "string" + }, + milestone_number: { + required: true, + type: "integer" + }, + number: { + alias: "milestone_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/milestones/:milestone_number" + } + }, + licenses: { + get: { + method: "GET", + params: { + license: { + required: true, + type: "string" + } + }, + url: "/licenses/:license" + }, + getForRepo: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/license" + }, + list: { + deprecated: "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", + method: "GET", + params: {}, + url: "/licenses" + }, + listCommonlyUsed: { + method: "GET", + params: {}, + url: "/licenses" + } + }, + markdown: { + render: { + method: "POST", + params: { + context: { + type: "string" + }, + mode: { + enum: ["markdown", "gfm"], + type: "string" + }, + text: { + required: true, + type: "string" + } + }, + url: "/markdown" + }, + renderRaw: { + headers: { + "content-type": "text/plain; charset=utf-8" + }, + method: "POST", + params: { + data: { + mapTo: "data", + required: true, + type: "string" + } + }, + url: "/markdown/raw" + } + }, + meta: { + get: { + method: "GET", + params: {}, + url: "/meta" + } + }, + migrations: { + cancelImport: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + deleteArchiveForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id/archive" + }, + deleteArchiveForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + downloadArchiveForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + getArchiveForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id/archive" + }, + getArchiveForOrg: { + deprecated: "octokit.migrations.getArchiveForOrg() has been renamed to octokit.migrations.downloadArchiveForOrg() (2020-01-27)", + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/archive" + }, + getCommitAuthors: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import/authors" + }, + getImportProgress: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + getLargeFiles: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/large_files" + }, + getStatusForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + } + }, + url: "/user/migrations/:migration_id" + }, + getStatusForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id" + }, + listForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/migrations" + }, + listForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/migrations" + }, + listReposForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/migrations/:migration_id/repositories" + }, + listReposForUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "GET", + params: { + migration_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/:migration_id/repositories" + }, + mapCommitAuthor: { + method: "PATCH", + params: { + author_id: { + required: true, + type: "integer" + }, + email: { + type: "string" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/authors/:author_id" + }, + setLfsPreference: { + method: "PATCH", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + use_lfs: { + enum: ["opt_in", "opt_out"], + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/import/lfs" + }, + startForAuthenticatedUser: { + method: "POST", + params: { + exclude_attachments: { + type: "boolean" + }, + lock_repositories: { + type: "boolean" + }, + repositories: { + required: true, + type: "string[]" + } + }, + url: "/user/migrations" + }, + startForOrg: { + method: "POST", + params: { + exclude_attachments: { + type: "boolean" + }, + lock_repositories: { + type: "boolean" + }, + org: { + required: true, + type: "string" + }, + repositories: { + required: true, + type: "string[]" + } + }, + url: "/orgs/:org/migrations" + }, + startImport: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tfvc_project: { + type: "string" + }, + vcs: { + enum: ["subversion", "git", "mercurial", "tfvc"], + type: "string" + }, + vcs_password: { + type: "string" + }, + vcs_url: { + required: true, + type: "string" + }, + vcs_username: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + }, + unlockRepoForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + repo_name: { + required: true, + type: "string" + } + }, + url: "/user/migrations/:migration_id/repos/:repo_name/lock" + }, + unlockRepoForOrg: { + headers: { + accept: "application/vnd.github.wyandotte-preview+json" + }, + method: "DELETE", + params: { + migration_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + repo_name: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock" + }, + updateImport: { + method: "PATCH", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + vcs_password: { + type: "string" + }, + vcs_username: { + type: "string" + } + }, + url: "/repos/:owner/:repo/import" + } + }, + oauthAuthorizations: { + checkAuthorization: { + deprecated: "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)", + method: "GET", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + createAuthorization: { + deprecated: "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization", + method: "POST", + params: { + client_id: { + type: "string" + }, + client_secret: { + type: "string" + }, + fingerprint: { + type: "string" + }, + note: { + required: true, + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations" + }, + deleteAuthorization: { + deprecated: "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization", + method: "DELETE", + params: { + authorization_id: { + required: true, + type: "integer" + } + }, + url: "/authorizations/:authorization_id" + }, + deleteGrant: { + deprecated: "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant", + method: "DELETE", + params: { + grant_id: { + required: true, + type: "integer" + } + }, + url: "/applications/grants/:grant_id" + }, + getAuthorization: { + deprecated: "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization", + method: "GET", + params: { + authorization_id: { + required: true, + type: "integer" + } + }, + url: "/authorizations/:authorization_id" + }, + getGrant: { + deprecated: "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant", + method: "GET", + params: { + grant_id: { + required: true, + type: "integer" + } + }, + url: "/applications/grants/:grant_id" + }, + getOrCreateAuthorizationForApp: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id" + }, + getOrCreateAuthorizationForAppAndFingerprint: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + required: true, + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id/:fingerprint" + }, + getOrCreateAuthorizationForAppFingerprint: { + deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", + method: "PUT", + params: { + client_id: { + required: true, + type: "string" + }, + client_secret: { + required: true, + type: "string" + }, + fingerprint: { + required: true, + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/clients/:client_id/:fingerprint" + }, + listAuthorizations: { + deprecated: "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/authorizations" + }, + listGrants: { + deprecated: "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/applications/grants" + }, + resetAuthorization: { + deprecated: "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)", + method: "POST", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeAuthorizationForApplication: { + deprecated: "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/tokens/:access_token" + }, + revokeGrantForApplication: { + deprecated: "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)", + method: "DELETE", + params: { + access_token: { + required: true, + type: "string" + }, + client_id: { + required: true, + type: "string" + } + }, + url: "/applications/:client_id/grants/:access_token" + }, + updateAuthorization: { + deprecated: "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization", + method: "PATCH", + params: { + add_scopes: { + type: "string[]" + }, + authorization_id: { + required: true, + type: "integer" + }, + fingerprint: { + type: "string" + }, + note: { + type: "string" + }, + note_url: { + type: "string" + }, + remove_scopes: { + type: "string[]" + }, + scopes: { + type: "string[]" + } + }, + url: "/authorizations/:authorization_id" + } + }, + orgs: { + addOrUpdateMembership: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + role: { + enum: ["admin", "member"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/memberships/:username" + }, + blockUser: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks/:username" + }, + checkBlockedUser: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks/:username" + }, + checkMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/members/:username" + }, + checkPublicMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/public_members/:username" + }, + concealMembership: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/public_members/:username" + }, + convertMemberToOutsideCollaborator: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/outside_collaborators/:username" + }, + createHook: { + method: "POST", + params: { + active: { + type: "boolean" + }, + config: { + required: true, + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks" + }, + createInvitation: { + method: "POST", + params: { + email: { + type: "string" + }, + invitee_id: { + type: "integer" + }, + org: { + required: true, + type: "string" + }, + role: { + enum: ["admin", "direct_member", "billing_manager"], + type: "string" + }, + team_ids: { + type: "integer[]" + } + }, + url: "/orgs/:org/invitations" + }, + deleteHook: { + method: "DELETE", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + get: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org" + }, + getHook: { + method: "GET", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + getMembership: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/memberships/:username" + }, + getMembershipForAuthenticatedUser: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/user/memberships/orgs/:org" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "integer" + } + }, + url: "/organizations" + }, + listBlockedUsers: { + method: "GET", + params: { + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/orgs" + }, + listForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/orgs" + }, + listHooks: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/hooks" + }, + listInstallations: { + headers: { + accept: "application/vnd.github.machine-man-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/installations" + }, + listInvitationTeams: { + method: "GET", + params: { + invitation_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/invitations/:invitation_id/teams" + }, + listMembers: { + method: "GET", + params: { + filter: { + enum: ["2fa_disabled", "all"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["all", "admin", "member"], + type: "string" + } + }, + url: "/orgs/:org/members" + }, + listMemberships: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["active", "pending"], + type: "string" + } + }, + url: "/user/memberships/orgs" + }, + listOutsideCollaborators: { + method: "GET", + params: { + filter: { + enum: ["2fa_disabled", "all"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/outside_collaborators" + }, + listPendingInvitations: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/invitations" + }, + listPublicMembers: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/public_members" + }, + pingHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id/pings" + }, + publicizeMembership: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/public_members/:username" + }, + removeMember: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/members/:username" + }, + removeMembership: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/memberships/:username" + }, + removeOutsideCollaborator: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/outside_collaborators/:username" + }, + unblockUser: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/blocks/:username" + }, + update: { + method: "PATCH", + params: { + billing_email: { + type: "string" + }, + company: { + type: "string" + }, + default_repository_permission: { + enum: ["read", "write", "admin", "none"], + type: "string" + }, + description: { + type: "string" + }, + email: { + type: "string" + }, + has_organization_projects: { + type: "boolean" + }, + has_repository_projects: { + type: "boolean" + }, + location: { + type: "string" + }, + members_allowed_repository_creation_type: { + enum: ["all", "private", "none"], + type: "string" + }, + members_can_create_internal_repositories: { + type: "boolean" + }, + members_can_create_private_repositories: { + type: "boolean" + }, + members_can_create_public_repositories: { + type: "boolean" + }, + members_can_create_repositories: { + type: "boolean" + }, + name: { + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org" + }, + updateHook: { + method: "PATCH", + params: { + active: { + type: "boolean" + }, + config: { + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + hook_id: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/hooks/:hook_id" + }, + updateMembership: { + method: "PATCH", + params: { + org: { + required: true, + type: "string" + }, + state: { + enum: ["active"], + required: true, + type: "string" + } + }, + url: "/user/memberships/orgs/:org" + } + }, + projects: { + addCollaborator: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username" + }, + createCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + column_id: { + required: true, + type: "integer" + }, + content_id: { + type: "integer" + }, + content_type: { + type: "string" + }, + note: { + type: "string" + } + }, + url: "/projects/columns/:column_id/cards" + }, + createColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + name: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/columns" + }, + createForAuthenticatedUser: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + } + }, + url: "/user/projects" + }, + createForOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/projects" + }, + createForRepo: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + body: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/projects" + }, + delete: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id" + }, + deleteCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + card_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/cards/:card_id" + }, + deleteColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + column_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/:column_id" + }, + get: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id" + }, + getCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + card_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/cards/:card_id" + }, + getColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + column_id: { + required: true, + type: "integer" + } + }, + url: "/projects/columns/:column_id" + }, + listCards: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + archived_state: { + enum: ["all", "archived", "not_archived"], + type: "string" + }, + column_id: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/projects/columns/:column_id/cards" + }, + listCollaborators: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + affiliation: { + enum: ["outside", "direct", "all"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/collaborators" + }, + listColumns: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + project_id: { + required: true, + type: "integer" + } + }, + url: "/projects/:project_id/columns" + }, + listForOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/orgs/:org/projects" + }, + listForRepo: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/projects" + }, + listForUser: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/projects" + }, + moveCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + card_id: { + required: true, + type: "integer" + }, + column_id: { + type: "integer" + }, + position: { + required: true, + type: "string", + validation: "^(top|bottom|after:\\d+)$" + } + }, + url: "/projects/columns/cards/:card_id/moves" + }, + moveColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "POST", + params: { + column_id: { + required: true, + type: "integer" + }, + position: { + required: true, + type: "string", + validation: "^(first|last|after:\\d+)$" + } + }, + url: "/projects/columns/:column_id/moves" + }, + removeCollaborator: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username" + }, + reviewUserPermissionLevel: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/projects/:project_id/collaborators/:username/permission" + }, + update: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + body: { + type: "string" + }, + name: { + type: "string" + }, + organization_permission: { + type: "string" + }, + private: { + type: "boolean" + }, + project_id: { + required: true, + type: "integer" + }, + state: { + enum: ["open", "closed"], + type: "string" + } + }, + url: "/projects/:project_id" + }, + updateCard: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + archived: { + type: "boolean" + }, + card_id: { + required: true, + type: "integer" + }, + note: { + type: "string" + } + }, + url: "/projects/columns/cards/:card_id" + }, + updateColumn: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PATCH", + params: { + column_id: { + required: true, + type: "integer" + }, + name: { + required: true, + type: "string" + } + }, + url: "/projects/columns/:column_id" + } + }, + pulls: { + checkIfMerged: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + create: { + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + body: { + type: "string" + }, + draft: { + type: "boolean" + }, + head: { + required: true, + type: "string" + }, + maintainer_can_modify: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls" + }, + createComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_id: { + required: true, + type: "string" + }, + in_reply_to: { + deprecated: true, + description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + type: "integer" + }, + line: { + type: "integer" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + position: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + side: { + enum: ["LEFT", "RIGHT"], + type: "string" + }, + start_line: { + type: "integer" + }, + start_side: { + enum: ["LEFT", "RIGHT", "side"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + createCommentReply: { + deprecated: "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_id: { + required: true, + type: "string" + }, + in_reply_to: { + deprecated: true, + description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.", + type: "integer" + }, + line: { + type: "integer" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + position: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + side: { + enum: ["LEFT", "RIGHT"], + type: "string" + }, + start_line: { + type: "integer" + }, + start_side: { + enum: ["LEFT", "RIGHT", "side"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + createFromIssue: { + deprecated: "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request", + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + draft: { + type: "boolean" + }, + head: { + required: true, + type: "string" + }, + issue: { + required: true, + type: "integer" + }, + maintainer_can_modify: { + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls" + }, + createReview: { + method: "POST", + params: { + body: { + type: "string" + }, + comments: { + type: "object[]" + }, + "comments[].body": { + required: true, + type: "string" + }, + "comments[].path": { + required: true, + type: "string" + }, + "comments[].position": { + required: true, + type: "integer" + }, + commit_id: { + type: "string" + }, + event: { + enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + createReviewCommentReply: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies" + }, + createReviewRequest: { + method: "POST", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + reviewers: { + type: "string[]" + }, + team_reviewers: { + type: "string[]" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + deleteComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + deletePendingReview: { + method: "DELETE", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + deleteReviewRequest: { + method: "DELETE", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + reviewers: { + type: "string[]" + }, + team_reviewers: { + type: "string[]" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + dismissReview: { + method: "PUT", + params: { + message: { + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals" + }, + get: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number" + }, + getComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + getCommentsForReview: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments" + }, + getReview: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + }, + list: { + method: "GET", + params: { + base: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + head: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["created", "updated", "popularity", "long-running"], + type: "string" + }, + state: { + enum: ["open", "closed", "all"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls" + }, + listComments: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + listCommentsForRepo: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + since: { + type: "string" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments" + }, + listCommits: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/commits" + }, + listFiles: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/files" + }, + listReviewRequests: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" + }, + listReviews: { + method: "GET", + params: { + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews" + }, + merge: { + method: "PUT", + params: { + commit_message: { + type: "string" + }, + commit_title: { + type: "string" + }, + merge_method: { + enum: ["merge", "squash", "rebase"], + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/merge" + }, + submitReview: { + method: "POST", + params: { + body: { + type: "string" + }, + event: { + enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"], + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events" + }, + update: { + method: "PATCH", + params: { + base: { + type: "string" + }, + body: { + type: "string" + }, + maintainer_can_modify: { + type: "boolean" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["open", "closed"], + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number" + }, + updateBranch: { + headers: { + accept: "application/vnd.github.lydian-preview+json" + }, + method: "PUT", + params: { + expected_head_sha: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/update-branch" + }, + updateComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id" + }, + updateReview: { + method: "PUT", + params: { + body: { + required: true, + type: "string" + }, + number: { + alias: "pull_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + pull_number: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + review_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" + } + }, + rateLimit: { + get: { + method: "GET", + params: {}, + url: "/rate_limit" + } + }, + reactions: { + createForCommitComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + createForIssue: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + createForIssueComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + createForPullRequestReviewComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + createForTeamDiscussion: { + deprecated: "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + createForTeamDiscussionComment: { + deprecated: "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionCommentInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionCommentLegacy: { + deprecated: "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + createForTeamDiscussionInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + createForTeamDiscussionLegacy: { + deprecated: "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "POST", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + delete: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "DELETE", + params: { + reaction_id: { + required: true, + type: "integer" + } + }, + url: "/reactions/:reaction_id" + }, + listForCommitComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id/reactions" + }, + listForIssue: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + issue_number: { + required: true, + type: "integer" + }, + number: { + alias: "issue_number", + deprecated: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/:issue_number/reactions" + }, + listForIssueComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions" + }, + listForPullRequestReviewComment: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" + }, + listForTeamDiscussion: { + deprecated: "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + }, + listForTeamDiscussionComment: { + deprecated: "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionCommentInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionCommentLegacy: { + deprecated: "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" + }, + listForTeamDiscussionInOrg: { + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions" + }, + listForTeamDiscussionLegacy: { + deprecated: "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy", + headers: { + accept: "application/vnd.github.squirrel-girl-preview+json" + }, + method: "GET", + params: { + content: { + enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/reactions" + } + }, + repos: { + acceptInvitation: { + method: "PATCH", + params: { + invitation_id: { + required: true, + type: "integer" + } + }, + url: "/user/repository_invitations/:invitation_id" + }, + addCollaborator: { + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + addDeployKey: { + method: "POST", + params: { + key: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + read_only: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + }, + title: { + type: "string" + } + }, + url: "/repos/:owner/:repo/keys" + }, + addProtectedBranchAdminEnforcement: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + addProtectedBranchAppRestrictions: { + method: "POST", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + addProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + addProtectedBranchRequiredStatusChecksContexts: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + addProtectedBranchTeamRestrictions: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + addProtectedBranchUserRestrictions: { + method: "POST", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + checkCollaborator: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + checkVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + compareCommits: { + method: "GET", + params: { + base: { + required: true, + type: "string" + }, + head: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/compare/:base...:head" + }, + createCommitComment: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + commit_sha: { + required: true, + type: "string" + }, + line: { + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + path: { + type: "string" + }, + position: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + alias: "commit_sha", + deprecated: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + createDeployment: { + method: "POST", + params: { + auto_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + environment: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + payload: { + type: "string" + }, + production_environment: { + type: "boolean" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + required_contexts: { + type: "string[]" + }, + task: { + type: "string" + }, + transient_environment: { + type: "boolean" + } + }, + url: "/repos/:owner/:repo/deployments" + }, + createDeploymentStatus: { + method: "POST", + params: { + auto_inactive: { + type: "boolean" + }, + deployment_id: { + required: true, + type: "integer" + }, + description: { + type: "string" + }, + environment: { + enum: ["production", "staging", "qa"], + type: "string" + }, + environment_url: { + type: "string" + }, + log_url: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + state: { + enum: ["error", "failure", "inactive", "in_progress", "queued", "pending", "success"], + required: true, + type: "string" + }, + target_url: { + type: "string" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + createDispatchEvent: { + method: "POST", + params: { + client_payload: { + type: "object" + }, + event_type: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/dispatches" + }, + createFile: { + deprecated: "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + method: "PUT", + params: { + author: { + type: "object" + }, + "author.email": { + required: true, + type: "string" + }, + "author.name": { + required: true, + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + required: true, + type: "string" + }, + "committer.name": { + required: true, + type: "string" + }, + content: { + required: true, + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + createForAuthenticatedUser: { + method: "POST", + params: { + allow_merge_commit: { + type: "boolean" + }, + allow_rebase_merge: { + type: "boolean" + }, + allow_squash_merge: { + type: "boolean" + }, + auto_init: { + type: "boolean" + }, + delete_branch_on_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + gitignore_template: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + license_template: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + type: "integer" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" + } + }, + url: "/user/repos" + }, + createFork: { + method: "POST", + params: { + organization: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/forks" + }, + createHook: { + method: "POST", + params: { + active: { + type: "boolean" + }, + config: { + required: true, + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks" + }, + createInOrg: { + method: "POST", + params: { + allow_merge_commit: { + type: "boolean" + }, + allow_rebase_merge: { + type: "boolean" + }, + allow_squash_merge: { + type: "boolean" + }, + auto_init: { + type: "boolean" + }, + delete_branch_on_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + gitignore_template: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + license_template: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + type: "integer" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" + } + }, + url: "/orgs/:org/repos" + }, + createOrUpdateFile: { + method: "PUT", + params: { + author: { + type: "object" + }, + "author.email": { + required: true, + type: "string" + }, + "author.name": { + required: true, + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + required: true, + type: "string" + }, + "committer.name": { + required: true, + type: "string" + }, + content: { + required: true, + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + createRelease: { + method: "POST", + params: { + body: { + type: "string" + }, + draft: { + type: "boolean" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + prerelease: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + }, + tag_name: { + required: true, + type: "string" + }, + target_commitish: { + type: "string" + } + }, + url: "/repos/:owner/:repo/releases" + }, + createStatus: { + method: "POST", + params: { + context: { + type: "string" + }, + description: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + }, + state: { + enum: ["error", "failure", "pending", "success"], + required: true, + type: "string" + }, + target_url: { + type: "string" + } + }, + url: "/repos/:owner/:repo/statuses/:sha" + }, + createUsingTemplate: { + headers: { + accept: "application/vnd.github.baptiste-preview+json" + }, + method: "POST", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + owner: { + type: "string" + }, + private: { + type: "boolean" + }, + template_owner: { + required: true, + type: "string" + }, + template_repo: { + required: true, + type: "string" + } + }, + url: "/repos/:template_owner/:template_repo/generate" + }, + declineInvitation: { + method: "DELETE", + params: { + invitation_id: { + required: true, + type: "integer" + } + }, + url: "/user/repository_invitations/:invitation_id" + }, + delete: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo" + }, + deleteCommitComment: { + method: "DELETE", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + deleteDownload: { + method: "DELETE", + params: { + download_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/downloads/:download_id" + }, + deleteFile: { + method: "DELETE", + params: { + author: { + type: "object" + }, + "author.email": { + type: "string" + }, + "author.name": { + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + type: "string" + }, + "committer.name": { + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + deleteHook: { + method: "DELETE", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + deleteInvitation: { + method: "DELETE", + params: { + invitation_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations/:invitation_id" + }, + deleteRelease: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + deleteReleaseAsset: { + method: "DELETE", + params: { + asset_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + disableAutomatedSecurityFixes: { + headers: { + accept: "application/vnd.github.london-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/automated-security-fixes" + }, + disablePagesSite: { + headers: { + accept: "application/vnd.github.switcheroo-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + disableVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + enableAutomatedSecurityFixes: { + headers: { + accept: "application/vnd.github.london-preview+json" + }, + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/automated-security-fixes" + }, + enablePagesSite: { + headers: { + accept: "application/vnd.github.switcheroo-preview+json" + }, + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + source: { + type: "object" + }, + "source.branch": { + enum: ["master", "gh-pages"], + type: "string" + }, + "source.path": { + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + enableVulnerabilityAlerts: { + headers: { + accept: "application/vnd.github.dorian-preview+json" + }, + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/vulnerability-alerts" + }, + get: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo" + }, + getAppsWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + getArchiveLink: { + method: "GET", + params: { + archive_format: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/:archive_format/:ref" + }, + getBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch" + }, + getBranchProtection: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" + }, + getClones: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + per: { + enum: ["day", "week"], + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/clones" + }, + getCodeFrequencyStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/code_frequency" + }, + getCollaboratorPermissionLevel: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username/permission" + }, + getCombinedStatusForRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/status" + }, + getCommit: { + method: "GET", + params: { + commit_sha: { + alias: "ref", + deprecated: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + alias: "ref", + deprecated: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref" + }, + getCommitActivityStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/commit_activity" + }, + getCommitComment: { + method: "GET", + params: { + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + getCommitRefSha: { + deprecated: "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit", + headers: { + accept: "application/vnd.github.v3.sha" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref" + }, + getContents: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + getContributorsStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/contributors" + }, + getDeployKey: { + method: "GET", + params: { + key_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/keys/:key_id" + }, + getDeployment: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id" + }, + getDeploymentStatus: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + status_id: { + required: true, + type: "integer" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id" + }, + getDownload: { + method: "GET", + params: { + download_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/downloads/:download_id" + }, + getHook: { + method: "GET", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + getLatestPagesBuild: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds/latest" + }, + getLatestRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/latest" + }, + getPages: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + getPagesBuild: { + method: "GET", + params: { + build_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds/:build_id" + }, + getParticipationStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/participation" + }, + getProtectedBranchAdminEnforcement: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + getProtectedBranchPullRequestReviewEnforcement: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + getProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + getProtectedBranchRequiredStatusChecks: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + getProtectedBranchRestrictions: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + getPunchCardStats: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/stats/punch_card" + }, + getReadme: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/readme" + }, + getRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + getReleaseAsset: { + method: "GET", + params: { + asset_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + getReleaseByTag: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + tag: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/tags/:tag" + }, + getTeamsWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + getTopPaths: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/popular/paths" + }, + getTopReferrers: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/popular/referrers" + }, + getUsersWithAccessToProtectedBranch: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + getViews: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + per: { + enum: ["day", "week"], + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/traffic/views" + }, + list: { + method: "GET", + params: { + affiliation: { + type: "string" + }, + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "owner", "public", "private", "member"], + type: "string" + }, + visibility: { + enum: ["all", "public", "private"], + type: "string" + } + }, + url: "/user/repos" + }, + listAppsWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + listAssetsForRelease: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id/assets" + }, + listBranches: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + protected: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches" + }, + listBranchesForHeadCommit: { + headers: { + accept: "application/vnd.github.groot-preview+json" + }, + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/branches-where-head" + }, + listCollaborators: { + method: "GET", + params: { + affiliation: { + enum: ["outside", "direct", "all"], + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators" + }, + listCommentsForCommit: { + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + alias: "commit_sha", + deprecated: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/comments" + }, + listCommitComments: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments" + }, + listCommits: { + method: "GET", + params: { + author: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + path: { + type: "string" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + }, + since: { + type: "string" + }, + until: { + type: "string" + } + }, + url: "/repos/:owner/:repo/commits" + }, + listContributors: { + method: "GET", + params: { + anon: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/contributors" + }, + listDeployKeys: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/keys" + }, + listDeploymentStatuses: { + method: "GET", + params: { + deployment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/deployments/:deployment_id/statuses" + }, + listDeployments: { + method: "GET", + params: { + environment: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + }, + task: { + type: "string" + } + }, + url: "/repos/:owner/:repo/deployments" + }, + listDownloads: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/downloads" + }, + listForOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "public", "private", "forks", "sources", "member", "internal"], + type: "string" + } + }, + url: "/orgs/:org/repos" + }, + listForUser: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + sort: { + enum: ["created", "updated", "pushed", "full_name"], + type: "string" + }, + type: { + enum: ["all", "owner", "member"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/repos" + }, + listForks: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + sort: { + enum: ["newest", "oldest", "stargazers"], + type: "string" + } + }, + url: "/repos/:owner/:repo/forks" + }, + listHooks: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks" + }, + listInvitations: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations" + }, + listInvitationsForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/repository_invitations" + }, + listLanguages: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/languages" + }, + listPagesBuilds: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds" + }, + listProtectedBranchRequiredStatusChecksContexts: { + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + listProtectedBranchTeamRestrictions: { + deprecated: "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + listProtectedBranchUserRestrictions: { + deprecated: "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + listPublic: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "integer" + } + }, + url: "/repositories" + }, + listPullRequestsAssociatedWithCommit: { + headers: { + accept: "application/vnd.github.groot-preview+json" + }, + method: "GET", + params: { + commit_sha: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:commit_sha/pulls" + }, + listReleases: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases" + }, + listStatusesForRef: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + ref: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/commits/:ref/statuses" + }, + listTags: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/tags" + }, + listTeams: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/teams" + }, + listTeamsWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + listTopics: { + headers: { + accept: "application/vnd.github.mercy-preview+json" + }, + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/topics" + }, + listUsersWithAccessToProtectedBranch: { + deprecated: "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)", + method: "GET", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + merge: { + method: "POST", + params: { + base: { + required: true, + type: "string" + }, + commit_message: { + type: "string" + }, + head: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/merges" + }, + pingHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id/pings" + }, + removeBranchProtection: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" + }, + removeCollaborator: { + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/collaborators/:username" + }, + removeDeployKey: { + method: "DELETE", + params: { + key_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/keys/:key_id" + }, + removeProtectedBranchAdminEnforcement: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" + }, + removeProtectedBranchAppRestrictions: { + method: "DELETE", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + removeProtectedBranchPullRequestReviewEnforcement: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + removeProtectedBranchRequiredSignatures: { + headers: { + accept: "application/vnd.github.zzzax-preview+json" + }, + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures" + }, + removeProtectedBranchRequiredStatusChecks: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + removeProtectedBranchRequiredStatusChecksContexts: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + removeProtectedBranchRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions" + }, + removeProtectedBranchTeamRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + removeProtectedBranchUserRestrictions: { + method: "DELETE", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + replaceProtectedBranchAppRestrictions: { + method: "PUT", + params: { + apps: { + mapTo: "data", + required: true, + type: "string[]" + }, + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps" + }, + replaceProtectedBranchRequiredStatusChecksContexts: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + mapTo: "data", + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" + }, + replaceProtectedBranchTeamRestrictions: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + teams: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" + }, + replaceProtectedBranchUserRestrictions: { + method: "PUT", + params: { + branch: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + users: { + mapTo: "data", + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" + }, + replaceTopics: { + headers: { + accept: "application/vnd.github.mercy-preview+json" + }, + method: "PUT", + params: { + names: { + required: true, + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/topics" + }, + requestPageBuild: { + method: "POST", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/pages/builds" + }, + retrieveCommunityProfileMetrics: { + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/community/profile" + }, + testPushHook: { + method: "POST", + params: { + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id/tests" + }, + transfer: { + method: "POST", + params: { + new_owner: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_ids: { + type: "integer[]" + } + }, + url: "/repos/:owner/:repo/transfer" + }, + update: { + method: "PATCH", + params: { + allow_merge_commit: { + type: "boolean" + }, + allow_rebase_merge: { + type: "boolean" + }, + allow_squash_merge: { + type: "boolean" + }, + archived: { + type: "boolean" + }, + default_branch: { + type: "string" + }, + delete_branch_on_merge: { + type: "boolean" + }, + description: { + type: "string" + }, + has_issues: { + type: "boolean" + }, + has_projects: { + type: "boolean" + }, + has_wiki: { + type: "boolean" + }, + homepage: { + type: "string" + }, + is_template: { + type: "boolean" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + repo: { + required: true, + type: "string" + }, + visibility: { + enum: ["public", "private", "visibility", "internal"], + type: "string" + } + }, + url: "/repos/:owner/:repo" + }, + updateBranchProtection: { + method: "PUT", + params: { + allow_deletions: { + type: "boolean" + }, + allow_force_pushes: { + allowNull: true, + type: "boolean" + }, + branch: { + required: true, + type: "string" + }, + enforce_admins: { + allowNull: true, + required: true, + type: "boolean" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + required_linear_history: { + type: "boolean" + }, + required_pull_request_reviews: { + allowNull: true, + required: true, + type: "object" + }, + "required_pull_request_reviews.dismiss_stale_reviews": { + type: "boolean" + }, + "required_pull_request_reviews.dismissal_restrictions": { + type: "object" + }, + "required_pull_request_reviews.dismissal_restrictions.teams": { + type: "string[]" + }, + "required_pull_request_reviews.dismissal_restrictions.users": { + type: "string[]" + }, + "required_pull_request_reviews.require_code_owner_reviews": { + type: "boolean" + }, + "required_pull_request_reviews.required_approving_review_count": { + type: "integer" + }, + required_status_checks: { + allowNull: true, + required: true, + type: "object" + }, + "required_status_checks.contexts": { + required: true, + type: "string[]" + }, + "required_status_checks.strict": { + required: true, + type: "boolean" + }, + restrictions: { + allowNull: true, + required: true, + type: "object" + }, + "restrictions.apps": { + type: "string[]" + }, + "restrictions.teams": { + required: true, + type: "string[]" + }, + "restrictions.users": { + required: true, + type: "string[]" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection" + }, + updateCommitComment: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/comments/:comment_id" + }, + updateFile: { + deprecated: "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", + method: "PUT", + params: { + author: { + type: "object" + }, + "author.email": { + required: true, + type: "string" + }, + "author.name": { + required: true, + type: "string" + }, + branch: { + type: "string" + }, + committer: { + type: "object" + }, + "committer.email": { + required: true, + type: "string" + }, + "committer.name": { + required: true, + type: "string" + }, + content: { + required: true, + type: "string" + }, + message: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + path: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + sha: { + type: "string" + } + }, + url: "/repos/:owner/:repo/contents/:path" + }, + updateHook: { + method: "PATCH", + params: { + active: { + type: "boolean" + }, + add_events: { + type: "string[]" + }, + config: { + type: "object" + }, + "config.content_type": { + type: "string" + }, + "config.insecure_ssl": { + type: "string" + }, + "config.secret": { + type: "string" + }, + "config.url": { + required: true, + type: "string" + }, + events: { + type: "string[]" + }, + hook_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + remove_events: { + type: "string[]" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/hooks/:hook_id" + }, + updateInformationAboutPagesSite: { + method: "PUT", + params: { + cname: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + source: { + enum: ['"gh-pages"', '"master"', '"master /docs"'], + type: "string" + } + }, + url: "/repos/:owner/:repo/pages" + }, + updateInvitation: { + method: "PATCH", + params: { + invitation_id: { + required: true, + type: "integer" + }, + owner: { + required: true, + type: "string" + }, + permissions: { + enum: ["read", "write", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/invitations/:invitation_id" + }, + updateProtectedBranchPullRequestReviewEnforcement: { + method: "PATCH", + params: { + branch: { + required: true, + type: "string" + }, + dismiss_stale_reviews: { + type: "boolean" + }, + dismissal_restrictions: { + type: "object" + }, + "dismissal_restrictions.teams": { + type: "string[]" + }, + "dismissal_restrictions.users": { + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + require_code_owner_reviews: { + type: "boolean" + }, + required_approving_review_count: { + type: "integer" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" + }, + updateProtectedBranchRequiredStatusChecks: { + method: "PATCH", + params: { + branch: { + required: true, + type: "string" + }, + contexts: { + type: "string[]" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + strict: { + type: "boolean" + } + }, + url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" + }, + updateRelease: { + method: "PATCH", + params: { + body: { + type: "string" + }, + draft: { + type: "boolean" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + prerelease: { + type: "boolean" + }, + release_id: { + required: true, + type: "integer" + }, + repo: { + required: true, + type: "string" + }, + tag_name: { + type: "string" + }, + target_commitish: { + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/:release_id" + }, + updateReleaseAsset: { + method: "PATCH", + params: { + asset_id: { + required: true, + type: "integer" + }, + label: { + type: "string" + }, + name: { + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + } + }, + url: "/repos/:owner/:repo/releases/assets/:asset_id" + }, + uploadReleaseAsset: { + method: "POST", + params: { + data: { + mapTo: "data", + required: true, + type: "string | object" + }, + file: { + alias: "data", + deprecated: true, + type: "string | object" + }, + headers: { + required: true, + type: "object" + }, + "headers.content-length": { + required: true, + type: "integer" + }, + "headers.content-type": { + required: true, + type: "string" + }, + label: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + url: { + required: true, + type: "string" + } + }, + url: ":url" + } + }, + search: { + code: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["indexed"], + type: "string" + } + }, + url: "/search/code" + }, + commits: { + headers: { + accept: "application/vnd.github.cloak-preview+json" + }, + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["author-date", "committer-date"], + type: "string" + } + }, + url: "/search/commits" + }, + issues: { + deprecated: "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"], + type: "string" + } + }, + url: "/search/issues" + }, + issuesAndPullRequests: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"], + type: "string" + } + }, + url: "/search/issues" + }, + labels: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + q: { + required: true, + type: "string" + }, + repository_id: { + required: true, + type: "integer" + }, + sort: { + enum: ["created", "updated"], + type: "string" + } + }, + url: "/search/labels" + }, + repos: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["stars", "forks", "help-wanted-issues", "updated"], + type: "string" + } + }, + url: "/search/repositories" + }, + topics: { + method: "GET", + params: { + q: { + required: true, + type: "string" + } + }, + url: "/search/topics" + }, + users: { + method: "GET", + params: { + order: { + enum: ["desc", "asc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + q: { + required: true, + type: "string" + }, + sort: { + enum: ["followers", "repositories", "joined"], + type: "string" + } + }, + url: "/search/users" + } + }, + teams: { + addMember: { + deprecated: "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)", + method: "PUT", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + addMemberLegacy: { + deprecated: "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy", + method: "PUT", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + addOrUpdateMembership: { + deprecated: "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)", + method: "PUT", + params: { + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + addOrUpdateMembershipInOrg: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + addOrUpdateMembershipLegacy: { + deprecated: "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy", + method: "PUT", + params: { + role: { + enum: ["member", "maintainer"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + addOrUpdateProject: { + deprecated: "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + addOrUpdateProjectInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + addOrUpdateProjectLegacy: { + deprecated: "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "PUT", + params: { + permission: { + enum: ["read", "write", "admin"], + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + addOrUpdateRepo: { + deprecated: "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)", + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + addOrUpdateRepoInOrg: { + method: "PUT", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + addOrUpdateRepoLegacy: { + deprecated: "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy", + method: "PUT", + params: { + owner: { + required: true, + type: "string" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + checkManagesRepo: { + deprecated: "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)", + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + checkManagesRepoInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + checkManagesRepoLegacy: { + deprecated: "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy", + method: "GET", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + create: { + method: "POST", + params: { + description: { + type: "string" + }, + maintainers: { + type: "string[]" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + repo_names: { + type: "string[]" + } + }, + url: "/orgs/:org/teams" + }, + createDiscussion: { + deprecated: "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/discussions" + }, + createDiscussionComment: { + deprecated: "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + createDiscussionCommentInOrg: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + createDiscussionCommentLegacy: { + deprecated: "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + createDiscussionInOrg: { + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_slug: { + required: true, + type: "string" + }, + title: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions" + }, + createDiscussionLegacy: { + deprecated: "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy", + method: "POST", + params: { + body: { + required: true, + type: "string" + }, + private: { + type: "boolean" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/discussions" + }, + delete: { + deprecated: "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + deleteDiscussion: { + deprecated: "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)", + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + deleteDiscussionComment: { + deprecated: "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)", + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionCommentInOrg: { + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionCommentLegacy: { + deprecated: "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy", + method: "DELETE", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + deleteDiscussionInOrg: { + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + deleteDiscussionLegacy: { + deprecated: "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy", + method: "DELETE", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + deleteInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + deleteLegacy: { + deprecated: "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + get: { + deprecated: "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + getByName: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + getDiscussion: { + deprecated: "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)", + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + getDiscussionComment: { + deprecated: "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)", + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionCommentInOrg: { + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionCommentLegacy: { + deprecated: "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy", + method: "GET", + params: { + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + getDiscussionInOrg: { + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + getDiscussionLegacy: { + deprecated: "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy", + method: "GET", + params: { + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + getLegacy: { + deprecated: "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + getMember: { + deprecated: "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + getMemberLegacy: { + deprecated: "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + getMembership: { + deprecated: "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + getMembershipInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + getMembershipLegacy: { + deprecated: "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy", + method: "GET", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + list: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/orgs/:org/teams" + }, + listChild: { + deprecated: "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/teams" + }, + listChildInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/teams" + }, + listChildLegacy: { + deprecated: "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/teams" + }, + listDiscussionComments: { + deprecated: "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + listDiscussionCommentsInOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments" + }, + listDiscussionCommentsLegacy: { + deprecated: "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments" + }, + listDiscussions: { + deprecated: "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions" + }, + listDiscussionsInOrg: { + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions" + }, + listDiscussionsLegacy: { + deprecated: "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy", + method: "GET", + params: { + direction: { + enum: ["asc", "desc"], + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions" + }, + listForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/teams" + }, + listMembers: { + deprecated: "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/members" + }, + listMembersInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/members" + }, + listMembersLegacy: { + deprecated: "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + role: { + enum: ["member", "maintainer", "all"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/members" + }, + listPendingInvitations: { + deprecated: "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/invitations" + }, + listPendingInvitationsInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/invitations" + }, + listPendingInvitationsLegacy: { + deprecated: "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/invitations" + }, + listProjects: { + deprecated: "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects" + }, + listProjectsInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects" + }, + listProjectsLegacy: { + deprecated: "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects" + }, + listRepos: { + deprecated: "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos" + }, + listReposInOrg: { + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos" + }, + listReposLegacy: { + deprecated: "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy", + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos" + }, + removeMember: { + deprecated: "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + removeMemberLegacy: { + deprecated: "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/members/:username" + }, + removeMembership: { + deprecated: "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + removeMembershipInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/memberships/:username" + }, + removeMembershipLegacy: { + deprecated: "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy", + method: "DELETE", + params: { + team_id: { + required: true, + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/teams/:team_id/memberships/:username" + }, + removeProject: { + deprecated: "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)", + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + removeProjectInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + removeProjectLegacy: { + deprecated: "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy", + method: "DELETE", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + removeRepo: { + deprecated: "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)", + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + removeRepoInOrg: { + method: "DELETE", + params: { + org: { + required: true, + type: "string" + }, + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo" + }, + removeRepoLegacy: { + deprecated: "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy", + method: "DELETE", + params: { + owner: { + required: true, + type: "string" + }, + repo: { + required: true, + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/repos/:owner/:repo" + }, + reviewProject: { + deprecated: "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + reviewProjectInOrg: { + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + org: { + required: true, + type: "string" + }, + project_id: { + required: true, + type: "integer" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/projects/:project_id" + }, + reviewProjectLegacy: { + deprecated: "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy", + headers: { + accept: "application/vnd.github.inertia-preview+json" + }, + method: "GET", + params: { + project_id: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/projects/:project_id" + }, + update: { + deprecated: "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)", + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + }, + updateDiscussion: { + deprecated: "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)", + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + type: "string" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + updateDiscussionComment: { + deprecated: "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)", + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionCommentInOrg: { + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionCommentLegacy: { + deprecated: "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy", + method: "PATCH", + params: { + body: { + required: true, + type: "string" + }, + comment_number: { + required: true, + type: "integer" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" + }, + updateDiscussionInOrg: { + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + org: { + required: true, + type: "string" + }, + team_slug: { + required: true, + type: "string" + }, + title: { + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number" + }, + updateDiscussionLegacy: { + deprecated: "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy", + method: "PATCH", + params: { + body: { + type: "string" + }, + discussion_number: { + required: true, + type: "integer" + }, + team_id: { + required: true, + type: "integer" + }, + title: { + type: "string" + } + }, + url: "/teams/:team_id/discussions/:discussion_number" + }, + updateInOrg: { + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + org: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_slug: { + required: true, + type: "string" + } + }, + url: "/orgs/:org/teams/:team_slug" + }, + updateLegacy: { + deprecated: "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy", + method: "PATCH", + params: { + description: { + type: "string" + }, + name: { + required: true, + type: "string" + }, + parent_team_id: { + type: "integer" + }, + permission: { + enum: ["pull", "push", "admin"], + type: "string" + }, + privacy: { + enum: ["secret", "closed"], + type: "string" + }, + team_id: { + required: true, + type: "integer" + } + }, + url: "/teams/:team_id" + } + }, + users: { + addEmails: { + method: "POST", + params: { + emails: { + required: true, + type: "string[]" + } + }, + url: "/user/emails" + }, + block: { + method: "PUT", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + checkBlocked: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + checkFollowing: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + checkFollowingForUser: { + method: "GET", + params: { + target_user: { + required: true, + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/following/:target_user" + }, + createGpgKey: { + method: "POST", + params: { + armored_public_key: { + type: "string" + } + }, + url: "/user/gpg_keys" + }, + createPublicKey: { + method: "POST", + params: { + key: { + type: "string" + }, + title: { + type: "string" + } + }, + url: "/user/keys" + }, + deleteEmails: { + method: "DELETE", + params: { + emails: { + required: true, + type: "string[]" + } + }, + url: "/user/emails" + }, + deleteGpgKey: { + method: "DELETE", + params: { + gpg_key_id: { + required: true, + type: "integer" + } + }, + url: "/user/gpg_keys/:gpg_key_id" + }, + deletePublicKey: { + method: "DELETE", + params: { + key_id: { + required: true, + type: "integer" + } + }, + url: "/user/keys/:key_id" + }, + follow: { + method: "PUT", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + getAuthenticated: { + method: "GET", + params: {}, + url: "/user" + }, + getByUsername: { + method: "GET", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/users/:username" + }, + getContextForUser: { + method: "GET", + params: { + subject_id: { + type: "string" + }, + subject_type: { + enum: ["organization", "repository", "issue", "pull_request"], + type: "string" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/hovercard" + }, + getGpgKey: { + method: "GET", + params: { + gpg_key_id: { + required: true, + type: "integer" + } + }, + url: "/user/gpg_keys/:gpg_key_id" + }, + getPublicKey: { + method: "GET", + params: { + key_id: { + required: true, + type: "integer" + } + }, + url: "/user/keys/:key_id" + }, + list: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + since: { + type: "string" + } + }, + url: "/users" + }, + listBlocked: { + method: "GET", + params: {}, + url: "/user/blocks" + }, + listEmails: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/emails" + }, + listFollowersForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/followers" + }, + listFollowersForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/followers" + }, + listFollowingForAuthenticatedUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/following" + }, + listFollowingForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/following" + }, + listGpgKeys: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/gpg_keys" + }, + listGpgKeysForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/gpg_keys" + }, + listPublicEmails: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/public_emails" + }, + listPublicKeys: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + } + }, + url: "/user/keys" + }, + listPublicKeysForUser: { + method: "GET", + params: { + page: { + type: "integer" + }, + per_page: { + type: "integer" + }, + username: { + required: true, + type: "string" + } + }, + url: "/users/:username/keys" + }, + togglePrimaryEmailVisibility: { + method: "PATCH", + params: { + email: { + required: true, + type: "string" + }, + visibility: { + required: true, + type: "string" + } + }, + url: "/user/email/visibility" + }, + unblock: { + method: "DELETE", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/blocks/:username" + }, + unfollow: { + method: "DELETE", + params: { + username: { + required: true, + type: "string" + } + }, + url: "/user/following/:username" + }, + updateAuthenticated: { + method: "PATCH", + params: { + bio: { + type: "string" + }, + blog: { + type: "string" + }, + company: { + type: "string" + }, + email: { + type: "string" + }, + hireable: { + type: "boolean" + }, + location: { + type: "string" + }, + name: { + type: "string" + } + }, + url: "/user" + } + } +}; + +const VERSION = "2.4.0"; + +function registerEndpoints(octokit, routes) { + Object.keys(routes).forEach(namespaceName => { + if (!octokit[namespaceName]) { + octokit[namespaceName] = {}; + } + + Object.keys(routes[namespaceName]).forEach(apiName => { + const apiOptions = routes[namespaceName][apiName]; + const endpointDefaults = ["method", "url", "headers"].reduce((map, key) => { + if (typeof apiOptions[key] !== "undefined") { + map[key] = apiOptions[key]; + } + + return map; + }, {}); + endpointDefaults.request = { + validate: apiOptions.params + }; + let request = octokit.request.defaults(endpointDefaults); // patch request & endpoint methods to support deprecated parameters. + // Not the most elegant solution, but we don’t want to move deprecation + // logic into octokit/endpoint.js as it’s out of scope + + const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find(key => apiOptions.params[key].deprecated); + + if (hasDeprecatedParam) { + const patch = patchForDeprecation.bind(null, octokit, apiOptions); + request = patch(octokit.request.defaults(endpointDefaults), `.${namespaceName}.${apiName}()`); + request.endpoint = patch(request.endpoint, `.${namespaceName}.${apiName}.endpoint()`); + request.endpoint.merge = patch(request.endpoint.merge, `.${namespaceName}.${apiName}.endpoint.merge()`); + } + + if (apiOptions.deprecated) { + octokit[namespaceName][apiName] = Object.assign(function deprecatedEndpointMethod() { + octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`)); + octokit[namespaceName][apiName] = request; + return request.apply(null, arguments); + }, request); + return; + } + + octokit[namespaceName][apiName] = request; + }); + }); +} + +function patchForDeprecation(octokit, apiOptions, method, methodName) { + const patchedMethod = options => { + options = Object.assign({}, options); + Object.keys(options).forEach(key => { + if (apiOptions.params[key] && apiOptions.params[key].deprecated) { + const aliasKey = apiOptions.params[key].alias; + octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead`)); + + if (!(aliasKey in options)) { + options[aliasKey] = options[key]; + } + + delete options[key]; + } + }); + return method(options); + }; + + Object.keys(method).forEach(key => { + patchedMethod[key] = method[key]; + }); + return patchedMethod; +} + +/** + * This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary + * goal is to rebuild @octokit/rest on top of @octokit/core. Once that is + * done, we will remove the registerEndpoints methods and return the methods + * directly as with the other plugins. At that point we will also remove the + * legacy workarounds and deprecations. + * + * See the plan at + * https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1 + */ + +function restEndpointMethods(octokit) { + // @ts-ignore + octokit.registerEndpoints = registerEndpoints.bind(null, octokit); + registerEndpoints(octokit, endpointsByScope); // Aliasing scopes for backward compatibility + // See https://github.com/octokit/rest.js/pull/1134 + + [["gitdata", "git"], ["authorization", "oauthAuthorizations"], ["pullRequests", "pulls"]].forEach(([deprecatedScope, scope]) => { + Object.defineProperty(octokit, deprecatedScope, { + get() { + octokit.log.warn( // @ts-ignore + new deprecation.Deprecation(`[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead`)); // @ts-ignore + + return octokit[scope]; + } + + }); + }); + return {}; +} +restEndpointMethods.VERSION = VERSION; + +exports.restEndpointMethods = restEndpointMethods; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 10537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deprecation = __nccwpck_require2_(58932); +var once = _interopDefault(__nccwpck_require2_(1223)); + +const logOnce = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ + +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + this.headers = options.headers || {}; // redact request credentials without mutating original request options + + const requestCopy = Object.assign({}, options.request); + + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } + +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 36234: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var endpoint = __nccwpck_require2_(59440); +var universalUserAgent = __nccwpck_require2_(41441); +var isPlainObject = _interopDefault(__nccwpck_require2_(48840)); +var nodeFetch = _interopDefault(__nccwpck_require2_(80467)); +var requestError = __nccwpck_require2_(10537); + +const VERSION = "5.4.0"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + + let headers = {}; + let status; + let url; + const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, requestOptions.request)).then(response => { + url = response.url; + status = response.status; + + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + + if (status === 204 || status === 205) { + return; + } // GitHub API returns 200 for HEAD requests + + + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + + throw new requestError.RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + + if (status >= 400) { + return response.text().then(message => { + const error = new requestError.RequestError(message, status, { + headers, + request: requestOptions + }); + + try { + let responseBody = JSON.parse(error.message); + Object.assign(error, responseBody); + let errors = responseBody.errors; // Assumption `errors` would always be in Array format + + error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); + } catch (e) {// ignore, see octokit/rest.js#684 + } + + throw error; + }); + } + + const contentType = response.headers.get("content-type"); + + if (/application\/json/.test(contentType)) { + return response.json(); + } + + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + + return getBufferResponse(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) { + throw error; + } + + throw new requestError.RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 41441: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var osName = _interopDefault(__nccwpck_require2_(54824)); + +function getUserAgent() { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return "Windows "; + } + + return ""; + } +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 29351: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +const { requestLog } = __nccwpck_require2_(68883); +const { + restEndpointMethods +} = __nccwpck_require2_(83044); + +const Core = __nccwpck_require2_(29833); + +const CORE_PLUGINS = [ + __nccwpck_require2_(64555), + __nccwpck_require2_(33691), // deprecated: remove in v17 + requestLog, + __nccwpck_require2_(18579), + restEndpointMethods, + __nccwpck_require2_(42657), + + __nccwpck_require2_(82072) // deprecated: remove in v17 +]; + +const OctokitRest = Core.plugin(CORE_PLUGINS); + +function DeprecatedOctokit(options) { + const warn = + options && options.log && options.log.warn + ? options.log.warn + : console.warn; + warn( + '[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead' + ); + return new OctokitRest(options); +} + +const Octokit = Object.assign(DeprecatedOctokit, { + Octokit: OctokitRest +}); + +Object.keys(OctokitRest).forEach(key => { + /* istanbul ignore else */ + if (OctokitRest.hasOwnProperty(key)) { + Octokit[key] = OctokitRest[key]; + } +}); + +module.exports = Octokit; + + +/***/ }), + +/***/ 30823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = Octokit; + +const { request } = __nccwpck_require2_(36234); +const Hook = __nccwpck_require2_(83682); + +const parseClientOptions = __nccwpck_require2_(64613); + +function Octokit(plugins, options) { + options = options || {}; + const hook = new Hook.Collection(); + const log = Object.assign( + { + debug: () => {}, + info: () => {}, + warn: console.warn, + error: console.error + }, + options && options.log + ); + const api = { + hook, + log, + request: request.defaults(parseClientOptions(options, log, hook)) + }; + + plugins.forEach(pluginFunction => pluginFunction(api, options)); + + return api; +} + + +/***/ }), + +/***/ 29833: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +const factory = __nccwpck_require2_(35320); + +module.exports = factory(); + + +/***/ }), + +/***/ 35320: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = factory; + +const Octokit = __nccwpck_require2_(30823); +const registerPlugin = __nccwpck_require2_(77826); + +function factory(plugins) { + const Api = Octokit.bind(null, plugins || []); + Api.plugin = registerPlugin.bind(null, plugins || []); + return Api; +} + + +/***/ }), + +/***/ 64613: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = parseOptions; + +const { Deprecation } = __nccwpck_require2_(58932); +const { getUserAgent } = __nccwpck_require2_(45030); +const once = __nccwpck_require2_(1223); + +const pkg = __nccwpck_require2_(51322); + +const deprecateOptionsTimeout = once((log, deprecation) => + log.warn(deprecation) +); +const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation)); +const deprecateOptionsHeaders = once((log, deprecation) => + log.warn(deprecation) +); + +function parseOptions(options, log, hook) { + if (options.headers) { + options.headers = Object.keys(options.headers).reduce((newObj, key) => { + newObj[key.toLowerCase()] = options.headers[key]; + return newObj; + }, {}); + } + + const clientDefaults = { + headers: options.headers || {}, + request: options.request || {}, + mediaType: { + previews: [], + format: "" + } + }; + + if (options.baseUrl) { + clientDefaults.baseUrl = options.baseUrl; + } + + if (options.userAgent) { + clientDefaults.headers["user-agent"] = options.userAgent; + } + + if (options.previews) { + clientDefaults.mediaType.previews = options.previews; + } + + if (options.timeZone) { + clientDefaults.headers["time-zone"] = options.timeZone; + } + + if (options.timeout) { + deprecateOptionsTimeout( + log, + new Deprecation( + "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.timeout = options.timeout; + } + + if (options.agent) { + deprecateOptionsAgent( + log, + new Deprecation( + "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" + ) + ); + clientDefaults.request.agent = options.agent; + } + + if (options.headers) { + deprecateOptionsHeaders( + log, + new Deprecation( + "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" + ) + ); + } + + const userAgentOption = clientDefaults.headers["user-agent"]; + const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; + + clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent] + .filter(Boolean) + .join(" "); + + clientDefaults.request.hook = hook.bind(null, "request"); + + return clientDefaults; +} + + +/***/ }), + +/***/ 77826: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = registerPlugin; + +const factory = __nccwpck_require2_(35320); + +function registerPlugin(plugins, pluginFunction) { + return factory( + plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) + ); +} + + +/***/ }), + +/***/ 96239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deprecation = __nccwpck_require2_(58932); +var once = _interopDefault(__nccwpck_require2_(1223)); + +const logOnce = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ + +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = "HttpError"; + this.status = statusCode; + Object.defineProperty(this, "code", { + get() { + logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + this.headers = options.headers || {}; // redact request credentials without mutating original request options + + const requestCopy = Object.assign({}, options.request); + + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + } + +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ 795: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticate; + +const { Deprecation } = __nccwpck_require2_(58932); +const once = __nccwpck_require2_(1223); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +function authenticate(state, options) { + deprecateAuthenticate( + state.octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' + ) + ); + + if (!options) { + state.auth = false; + return; + } + + switch (options.type) { + case "basic": + if (!options.username || !options.password) { + throw new Error( + "Basic authentication requires both a username and password to be set" + ); + } + break; + + case "oauth": + if (!options.token && !(options.key && options.secret)) { + throw new Error( + "OAuth2 authentication requires a token or key & secret to be set" + ); + } + break; + + case "token": + case "app": + if (!options.token) { + throw new Error("Token authentication requires a token to be set"); + } + break; + + default: + throw new Error( + "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" + ); + } + + state.auth = options; +} + + +/***/ }), + +/***/ 47578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationBeforeRequest; + +const btoa = __nccwpck_require2_(72358); +const uniq = __nccwpck_require2_(78216); + +function authenticationBeforeRequest(state, options) { + if (!state.auth.type) { + return; + } + + if (state.auth.type === "basic") { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + if (state.auth.type === "token") { + options.headers.authorization = `token ${state.auth.token}`; + return; + } + + if (state.auth.type === "app") { + options.headers.authorization = `Bearer ${state.auth.token}`; + const acceptHeaders = options.headers.accept + .split(",") + .concat("application/vnd.github.machine-man-preview+json"); + options.headers.accept = uniq(acceptHeaders) + .filter(Boolean) + .join(","); + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + + if (state.auth.token) { + options.url += `access_token=${encodeURIComponent(state.auth.token)}`; + return; + } + + const key = encodeURIComponent(state.auth.key); + const secret = encodeURIComponent(state.auth.secret); + options.url += `client_id=${key}&client_secret=${secret}`; +} + + +/***/ }), + +/***/ 33691: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationPlugin; + +const { Deprecation } = __nccwpck_require2_(58932); +const once = __nccwpck_require2_(1223); + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); + +const authenticate = __nccwpck_require2_(795); +const beforeRequest = __nccwpck_require2_(47578); +const requestError = __nccwpck_require2_(54275); + +function authenticationPlugin(octokit, options) { + if (options.auth) { + octokit.authenticate = () => { + deprecateAuthenticate( + octokit.log, + new Deprecation( + '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' + ) + ); + }; + return; + } + const state = { + octokit, + auth: false + }; + octokit.authenticate = authenticate.bind(null, state); + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} + + +/***/ }), + +/***/ 54275: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationRequestError; + +const { RequestError } = __nccwpck_require2_(96239); + +function authenticationRequestError(state, error, options) { + /* istanbul ignore next */ + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign( + { "x-github-otp": oneTimePassword }, + options.headers + ) + }); + return state.octokit.request(newOptions); + }); +} + + +/***/ }), + +/***/ 99733: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationBeforeRequest; + +const btoa = __nccwpck_require2_(72358); + +const withAuthorizationPrefix = __nccwpck_require2_(19603); + +function authenticationBeforeRequest(state, options) { + if (typeof state.auth === "string") { + options.headers.authorization = withAuthorizationPrefix(state.auth); + return; + } + + if (state.auth.username) { + const hash = btoa(`${state.auth.username}:${state.auth.password}`); + options.headers.authorization = `Basic ${hash}`; + if (state.otp) { + options.headers["x-github-otp"] = state.otp; + } + return; + } + + if (state.auth.clientId) { + // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as + // Basic Authorization instead of query parameters. The only routes where that applies share the same + // URL though: `/applications/:client_id/tokens/:access_token`. + // + // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) + // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) + // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) + // + // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" + // as well as "/applications/123/tokens/token456" + if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) { + const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`); + options.headers.authorization = `Basic ${hash}`; + return; + } + + options.url += options.url.indexOf("?") === -1 ? "?" : "&"; + options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`; + return; + } + + return Promise.resolve() + + .then(() => { + return state.auth(); + }) + + .then(authorization => { + options.headers.authorization = withAuthorizationPrefix(authorization); + }); +} + + +/***/ }), + +/***/ 64555: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationPlugin; + +const { createTokenAuth } = __nccwpck_require2_(40334); +const { Deprecation } = __nccwpck_require2_(58932); +const once = __nccwpck_require2_(1223); + +const beforeRequest = __nccwpck_require2_(99733); +const requestError = __nccwpck_require2_(3217); +const validate = __nccwpck_require2_(18997); +const withAuthorizationPrefix = __nccwpck_require2_(19603); + +const deprecateAuthBasic = once((log, deprecation) => log.warn(deprecation)); +const deprecateAuthObject = once((log, deprecation) => log.warn(deprecation)); + +function authenticationPlugin(octokit, options) { + // If `options.authStrategy` is set then use it and pass in `options.auth` + if (options.authStrategy) { + const auth = options.authStrategy(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `octokit.auth()` method is a no-op and no request hook is registred. + if (!options.auth) { + octokit.auth = () => + Promise.resolve({ + type: "unauthenticated" + }); + return; + } + + const isBasicAuthString = + typeof options.auth === "string" && + /^basic/.test(withAuthorizationPrefix(options.auth)); + + // If only `options.auth` is set to a string, use the default token authentication strategy. + if (typeof options.auth === "string" && !isBasicAuthString) { + const auth = createTokenAuth(options.auth); + octokit.hook.wrap("request", auth.hook); + octokit.auth = auth; + return; + } + + // Otherwise log a deprecation message + const [deprecationMethod, deprecationMessapge] = isBasicAuthString + ? [ + deprecateAuthBasic, + 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)' + ] + : [ + deprecateAuthObject, + 'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)' + ]; + deprecationMethod( + octokit.log, + new Deprecation("[@octokit/rest] " + deprecationMessapge) + ); + + octokit.auth = () => + Promise.resolve({ + type: "deprecated", + message: deprecationMessapge + }); + + validate(options.auth); + + const state = { + octokit, + auth: options.auth + }; + + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); +} + + +/***/ }), + +/***/ 3217: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = authenticationRequestError; + +const { RequestError } = __nccwpck_require2_(96239); + +function authenticationRequestError(state, error, options) { + if (!error.headers) throw error; + + const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); + // handle "2FA required" error only + if (error.status !== 401 || !otpRequired) { + throw error; + } + + if ( + error.status === 401 && + otpRequired && + error.request && + error.request.headers["x-github-otp"] + ) { + if (state.otp) { + delete state.otp; // no longer valid, request again + } else { + throw new RequestError( + "Invalid one-time password for two-factor authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + } + + if (typeof state.auth.on2fa !== "function") { + throw new RequestError( + "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", + 401, + { + headers: error.headers, + request: options + } + ); + } + + return Promise.resolve() + .then(() => { + return state.auth.on2fa(); + }) + .then(oneTimePassword => { + const newOptions = Object.assign(options, { + headers: Object.assign(options.headers, { + "x-github-otp": oneTimePassword + }) + }); + return state.octokit.request(newOptions).then(response => { + // If OTP still valid, then persist it for following requests + state.otp = oneTimePassword; + return response; + }); + }); +} + + +/***/ }), + +/***/ 18997: +/***/ ((module) => { + +module.exports = validateAuth; + +function validateAuth(auth) { + if (typeof auth === "string") { + return; + } + + if (typeof auth === "function") { + return; + } + + if (auth.username && auth.password) { + return; + } + + if (auth.clientId && auth.clientSecret) { + return; + } + + throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); +} + + +/***/ }), + +/***/ 19603: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = withAuthorizationPrefix; + +const atob = __nccwpck_require2_(55224); + +const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; + +function withAuthorizationPrefix(authorization) { + if (/^(basic|bearer|token) /i.test(authorization)) { + return authorization; + } + + try { + if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { + return `basic ${authorization}`; + } + } catch (error) {} + + if (authorization.split(/\./).length === 3) { + return `bearer ${authorization}`; + } + + return `token ${authorization}`; +} + + +/***/ }), + +/***/ 18579: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = paginatePlugin; + +const { paginateRest } = __nccwpck_require2_(64193); + +function paginatePlugin(octokit) { + Object.assign(octokit, paginateRest(octokit)); +} + + +/***/ }), + +/***/ 42657: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +module.exports = octokitValidate; + +const validate = __nccwpck_require2_(6132); + +function octokitValidate(octokit) { + octokit.hook.before("request", validate.bind(null, octokit)); +} + + +/***/ }), + +/***/ 6132: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +"use strict"; + + +module.exports = validate; + +const { RequestError } = __nccwpck_require2_(96239); +const get = __nccwpck_require2_(99197); +const set = __nccwpck_require2_(51552); + +function validate(octokit, options) { + if (!options.request.validate) { + return; + } + const { validate: params } = options.request; + + Object.keys(params).forEach(parameterName => { + const parameter = get(params, parameterName); + + const expectedType = parameter.type; + let parentParameterName; + let parentValue; + let parentParamIsPresent = true; + let parentParameterIsArray = false; + + if (/\./.test(parameterName)) { + parentParameterName = parameterName.replace(/\.[^.]+$/, ""); + parentParameterIsArray = parentParameterName.slice(-2) === "[]"; + if (parentParameterIsArray) { + parentParameterName = parentParameterName.slice(0, -2); + } + parentValue = get(options, parentParameterName); + parentParamIsPresent = + parentParameterName === "headers" || + (typeof parentValue === "object" && parentValue !== null); + } + + const values = parentParameterIsArray + ? (get(options, parentParameterName) || []).map( + value => value[parameterName.split(/\./).pop()] + ) + : [get(options, parameterName)]; + + values.forEach((value, i) => { + const valueIsPresent = typeof value !== "undefined"; + const valueIsNull = value === null; + const currentParameterName = parentParameterIsArray + ? parameterName.replace(/\[\]/, `[${i}]`) + : parameterName; + + if (!parameter.required && !valueIsPresent) { + return; + } + + // if the parent parameter is of type object but allows null + // then the child parameters can be ignored + if (!parentParamIsPresent) { + return; + } + + if (parameter.allowNull && valueIsNull) { + return; + } + + if (!parameter.allowNull && valueIsNull) { + throw new RequestError( + `'${currentParameterName}' cannot be null`, + 400, + { + request: options + } + ); + } + + if (parameter.required && !valueIsPresent) { + throw new RequestError( + `Empty value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + // parse to integer before checking for enum + // so that string "1" will match enum with number 1 + if (expectedType === "integer") { + const unparsedValue = value; + value = parseInt(value, 10); + if (isNaN(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + unparsedValue + )} is NaN`, + 400, + { + request: options + } + ); + } + } + + if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + + if (parameter.validation) { + const regex = new RegExp(parameter.validation); + if (!regex.test(value)) { + throw new RequestError( + `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + if (expectedType === "object" && typeof value === "string") { + try { + value = JSON.parse(value); + } catch (exception) { + throw new RequestError( + `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( + value + )}`, + 400, + { + request: options + } + ); + } + } + + set(options, parameter.mapTo || currentParameterName, value); + }); + }); + + return options; +} + + +/***/ }), + +/***/ 25995: +/***/ ((module) => { + +module.exports = r => { + const n = process.versions.node.split('.').map(x => parseInt(x, 10)) + r = r.split('.').map(x => parseInt(x, 10)) + return n[0] > r[0] || (n[0] === r[0] && (n[1] > r[1] || (n[1] === r[1] && n[2] >= r[2]))) +} + + +/***/ }), + +/***/ 55224: +/***/ ((module) => { + +module.exports = function atob(str) { + return Buffer.from(str, 'base64').toString('binary') +} + + +/***/ }), + +/***/ 83682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require2_) => { + +var register = __nccwpck_require2_(44670) +var addHook = __nccwpck_require2_(5549) +var removeHook = __nccwpck_require2_(6819) + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind +var bindable = bind.bind(bind) + +function bindApi (hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) + hook.api = { remove: removeHookRef } + hook.remove = removeHookRef + + ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind] + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) + }) +} + +function HookSingular () { + var singularHookName = 'h' + var singularHookState = { + registry: {} + } + var singularHook = register.bind(null, singularHookState, singularHookName) + bindApi(singularHook, singularHookState, singularHookName) + return singularHook +} + +function HookCollection () { + var state = { + registry: {} + } + + var hook = register.bind(null, state) + bindApi(hook, state) + + return hook +} + +var collectionHookDeprecationMessageDisplayed = false +function Hook () { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') + collectionHookDeprecationMessageDisplayed = true + } + return HookCollection() +} + +Hook.Singular = HookSingular.bind() +Hook.Collection = HookCollection.bind() + +module.exports = Hook +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook +module.exports.Singular = Hook.Singular +module.exports.Collection = Hook.Collection + + +/***/ }), + +/***/ 5549: +/***/ ((module) => { + +module.exports = addHook + +function addHook (state, kind, name, hook) { + var orig = hook + if (!state.registry[name]) { + state.registry[name] = [] + } + + if (kind === 'before') { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)) + } + } + + if (kind === 'after') { + hook = function (method, options) { + var result + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_ + return orig(result, options) + }) + .then(function () { + return result + }) + } + } + + if (kind === 'error') { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options) + }) + } + } + + state.registry[name].push({ + hook: hook, + orig: orig + }) +} + + +/***/ }), + +/***/ 44670: +/***/ ((module) => { + +module.exports = register + +function register (state, name, method, options) { + if (typeof method !== 'function') { + throw new Error('method for before hook must be a function') + } + + if (!options) { + options = {} + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options) + }, method)() + } + + return Promise.resolve() + .then(function () { + if (!state.registry[name]) { + return method(options) + } + + return (state.registry[name]).reduce(function (method, registered) { + return registered.hook.bind(null, method, options) + }, method)() + }) +} + + +/***/ }), + +/***/ 6819: +/***/ ((module) => { + +module.exports = removeHook + +function removeHook (state, name, method) { + if (!state.registry[name]) { + return + } + + var index = state.registry[name] + .map(function (registered) { return registered.orig }) + .indexOf(method) + + if (index === -1) { + return + } + + state.registry[name].splice(index, 1) +} + + +/***/ }), + +/***/ 44159: +/***/ ((module) => { + +module.exports = { + trueFunc: function trueFunc(){ + return true; + }, + falseFunc: function falseFunc(){ + return false; + } +}; + +/***/ }), + +/***/ 72358: +/***/ ((module) => { + +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') +} + + +/***/ }), + +/***/ 63094: +/***/ ((module, exports, __nccwpck_require2_) => { + +/** + * Export cheerio (with ) + */ + +exports = module.exports = __nccwpck_require2_(10641); + +/* + Export the version +*/ + +exports.version = __nccwpck_require2_(24542).version; + + +/***/ }), + +/***/ 68596: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +var $ = __nccwpck_require2_(80002), + utils = __nccwpck_require2_(51183), + isTag = utils.isTag, + domEach = utils.domEach, + hasOwn = Object.prototype.hasOwnProperty, + camelCase = utils.camelCase, + cssCase = utils.cssCase, + rspace = /\s+/, + dataAttrPrefix = 'data-', + _ = { + forEach: __nccwpck_require2_(90090), + extend: __nccwpck_require2_(5716), + some: __nccwpck_require2_(40889) + }, + + // Lookup table for coercing string data-* attributes to their corresponding + // JavaScript primitives + primitives = { + null: null, + true: true, + false: false + }, + + // Attributes that are booleans + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + // Matches strings that look like JSON objects or arrays + rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/; + + +var getAttr = function(elem, name) { + if (!elem || !isTag(elem)) return; + + if (!elem.attribs) { + elem.attribs = {}; + } + + // Return the entire attribs object if no attribute specified + if (!name) { + return elem.attribs; + } + + if (hasOwn.call(elem.attribs, name)) { + // Get the (decoded) attribute + return rboolean.test(name) ? name : elem.attribs[name]; + } + + // Mimic the DOM and return text content as value for `option's` + if (elem.name === 'option' && name === 'value') { + return $.text(elem.children); + } + + // Mimic DOM with default value for radios/checkboxes + if (elem.name === 'input' && + (elem.attribs.type === 'radio' || elem.attribs.type === 'checkbox') && + name === 'value') { + return 'on'; + } +}; + +var setAttr = function(el, name, value) { + + if (value === null) { + removeAttribute(el, name); + } else { + el.attribs[name] = value+''; + } +}; + +exports.attr = function(name, value) { + // Set the value (with attr map support) + if (typeof name === 'object' || value !== undefined) { + if (typeof value === 'function') { + return domEach(this, function(i, el) { + setAttr(el, name, value.call(el, i, el.attribs[name])); + }); + } + return domEach(this, function(i, el) { + if (!isTag(el)) return; + + if (typeof name === 'object') { + _.forEach(name, function(objValue, objName) { + setAttr(el, objName, objValue); + }); + } else { + setAttr(el, name, value); + } + }); + } + + return getAttr(this[0], name); +}; + +var getProp = function (el, name) { + if (!el || !isTag(el)) return; + + return hasOwn.call(el, name) + ? el[name] + : rboolean.test(name) + ? getAttr(el, name) !== undefined + : getAttr(el, name); +}; + +var setProp = function (el, name, value) { + el[name] = rboolean.test(name) ? !!value : value; +}; + +exports.prop = function (name, value) { + var i = 0, + property; + + if (typeof name === 'string' && value === undefined) { + + switch (name) { + case 'style': + property = this.css(); + + _.forEach(property, function (v, p) { + property[i++] = p; + }); + + property.length = i; + + break; + case 'tagName': + case 'nodeName': + property = this[0].name.toUpperCase(); + break; + default: + property = getProp(this[0], name); + } + + return property; + } + + if (typeof name === 'object' || value !== undefined) { + + if (typeof value === 'function') { + return domEach(this, function(j, el) { + setProp(el, name, value.call(el, j, getProp(el, name))); + }); + } + + return domEach(this, function(__, el) { + if (!isTag(el)) return; + + if (typeof name === 'object') { + + _.forEach(name, function(val, key) { + setProp(el, key, val); + }); + + } else { + setProp(el, name, value); + } + }); + + } +}; + +var setData = function(el, name, value) { + if (!el.data) { + el.data = {}; + } + + if (typeof name === 'object') return _.extend(el.data, name); + if (typeof name === 'string' && value !== undefined) { + el.data[name] = value; + } +}; + +// Read the specified attribute from the equivalent HTML5 `data-*` attribute, +// and (if present) cache the value in the node's internal data store. If no +// attribute name is specified, read *all* HTML5 `data-*` attributes in this +// manner. +var readData = function(el, name) { + var readAll = arguments.length === 1; + var domNames, domName, jsNames, jsName, value, idx, length; + + if (readAll) { + domNames = Object.keys(el.attribs).filter(function(attrName) { + return attrName.slice(0, dataAttrPrefix.length) === dataAttrPrefix; + }); + jsNames = domNames.map(function(_domName) { + return camelCase(_domName.slice(dataAttrPrefix.length)); + }); + } else { + domNames = [dataAttrPrefix + cssCase(name)]; + jsNames = [name]; + } + + for (idx = 0, length = domNames.length; idx < length; ++idx) { + domName = domNames[idx]; + jsName = jsNames[idx]; + if (hasOwn.call(el.attribs, domName)) { + value = el.attribs[domName]; + + if (hasOwn.call(primitives, value)) { + value = primitives[value]; + } else if (value === String(Number(value))) { + value = Number(value); + } else if (rbrace.test(value)) { + try { + value = JSON.parse(value); + } catch(e){ } + } + + el.data[jsName] = value; + } + } + + return readAll ? el.data : value; +}; + +exports.data = function(name, value) { + var elem = this[0]; + + if (!elem || !isTag(elem)) return; + + if (!elem.data) { + elem.data = {}; + } + + // Return the entire data object if no data specified + if (!name) { + return readData(elem); + } + + // Set the value (with attr map support) + if (typeof name === 'object' || value !== undefined) { + domEach(this, function(i, el) { + setData(el, name, value); + }); + return this; + } else if (hasOwn.call(elem.data, name)) { + return elem.data[name]; + } + + return readData(elem, name); +}; + +/** + * Get the value of an element + */ + +exports.val = function(value) { + var querying = arguments.length === 0, + element = this[0]; + + if(!element) return; + + switch (element.name) { + case 'textarea': + return this.text(value); + case 'input': + switch (this.attr('type')) { + case 'radio': + if (querying) { + return this.attr('value'); + } else { + this.attr('value', value); + return this; + } + break; + default: + return this.attr('value', value); + } + return; + case 'select': + var option = this.find('option:selected'), + returnValue; + if (option === undefined) return undefined; + if (!querying) { + if (!hasOwn.call(this.attr(), 'multiple') && typeof value == 'object') { + return this; + } + if (typeof value != 'object') { + value = [value]; + } + this.find('option').removeAttr('selected'); + for (var i = 0; i < value.length; i++) { + this.find('option[value="' + value[i] + '"]').attr('selected', ''); + } + return this; + } + returnValue = option.attr('value'); + if (hasOwn.call(this.attr(), 'multiple')) { + returnValue = []; + domEach(option, function(__, el) { + returnValue.push(getAttr(el, 'value')); + }); + } + return returnValue; + case 'option': + if (!querying) { + this.attr('value', value); + return this; + } + return this.attr('value'); + } +}; + +/** + * Remove an attribute + */ + +var removeAttribute = function(elem, name) { + if (!elem.attribs || !hasOwn.call(elem.attribs, name)) + return; + + delete elem.attribs[name]; +}; + + +exports.removeAttr = function(name) { + domEach(this, function(i, elem) { + removeAttribute(elem, name); + }); + + return this; +}; + +exports.hasClass = function(className) { + return _.some(this, function(elem) { + var attrs = elem.attribs, + clazz = attrs && attrs['class'], + idx = -1, + end; + + if (clazz && className.length) { + while ((idx = clazz.indexOf(className, idx+1)) > -1) { + end = idx + className.length; + + if ((idx === 0 || rspace.test(clazz[idx-1])) + && (end === clazz.length || rspace.test(clazz[end]))) { + return true; + } + } + } + }); +}; + +exports.addClass = function(value) { + // Support functions + if (typeof value === 'function') { + return domEach(this, function(i, el) { + var className = el.attribs['class'] || ''; + exports.addClass.call([el], value.call(el, i, className)); + }); + } + + // Return if no value or not a string or function + if (!value || typeof value !== 'string') return this; + + var classNames = value.split(rspace), + numElements = this.length; + + + for (var i = 0; i < numElements; i++) { + // If selected element isn't a tag, move on + if (!isTag(this[i])) continue; + + // If we don't already have classes + var className = getAttr(this[i], 'class'), + numClasses, + setClass; + + if (!className) { + setAttr(this[i], 'class', classNames.join(' ').trim()); + } else { + setClass = ' ' + className + ' '; + numClasses = classNames.length; + + // Check if class already exists + for (var j = 0; j < numClasses; j++) { + var appendClass = classNames[j] + ' '; + if (setClass.indexOf(' ' + appendClass) < 0) + setClass += appendClass; + } + + setAttr(this[i], 'class', setClass.trim()); + } + } + + return this; +}; + +var splitClass = function(className) { + return className ? className.trim().split(rspace) : []; +}; + +exports.removeClass = function(value) { + var classes, + numClasses, + removeAll; + + // Handle if value is a function + if (typeof value === 'function') { + return domEach(this, function(i, el) { + exports.removeClass.call( + [el], value.call(el, i, el.attribs['class'] || '') + ); + }); + } + + classes = splitClass(value); + numClasses = classes.length; + removeAll = arguments.length === 0; + + return domEach(this, function(i, el) { + if (!isTag(el)) return; + + if (removeAll) { + // Short circuit the remove all case as this is the nice one + el.attribs.class = ''; + } else { + var elClasses = splitClass(el.attribs.class), + index, + changed; + + for (var j = 0; j < numClasses; j++) { + index = elClasses.indexOf(classes[j]); + + if (index >= 0) { + elClasses.splice(index, 1); + changed = true; + + // We have to do another pass to ensure that there are not duplicate + // classes listed + j--; + } + } + if (changed) { + el.attribs.class = elClasses.join(' '); + } + } + }); +}; + +exports.toggleClass = function(value, stateVal) { + // Support functions + if (typeof value === 'function') { + return domEach(this, function(i, el) { + exports.toggleClass.call( + [el], + value.call(el, i, el.attribs['class'] || '', stateVal), + stateVal + ); + }); + } + + // Return if no value or not a string or function + if (!value || typeof value !== 'string') return this; + + var classNames = value.split(rspace), + numClasses = classNames.length, + state = typeof stateVal === 'boolean' ? stateVal ? 1 : -1 : 0, + numElements = this.length, + elementClasses, + index; + + for (var i = 0; i < numElements; i++) { + // If selected element isn't a tag, move on + if (!isTag(this[i])) continue; + + elementClasses = splitClass(this[i].attribs.class); + + // Check if class already exists + for (var j = 0; j < numClasses; j++) { + // Check if the class name is currently defined + index = elementClasses.indexOf(classNames[j]); + + // Add if stateValue === true or we are toggling and there is no value + if (state >= 0 && index < 0) { + elementClasses.push(classNames[j]); + } else if (state <= 0 && index >= 0) { + // Otherwise remove but only if the item exists + elementClasses.splice(index, 1); + } + } + + this[i].attribs.class = elementClasses.join(' '); + } + + return this; +}; + +exports.is = function (selector) { + if (selector) { + return this.filter(selector).length > 0; + } + return false; +}; + + +/***/ }), + +/***/ 7084: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +var domEach = (__nccwpck_require2_(51183).domEach), + _ = { + pick: __nccwpck_require2_(13418), + }; + +var toString = Object.prototype.toString; + +/** + * Set / Get css. + * + * @param {String|Object} prop + * @param {String} val + * @return {self} + * @api public + */ + +exports.css = function(prop, val) { + if (arguments.length === 2 || + // When `prop` is a "plain" object + (toString.call(prop) === '[object Object]')) { + return domEach(this, function(idx, el) { + setCss(el, prop, val, idx); + }); + } else { + return getCss(this[0], prop); + } +}; + +/** + * Set styles of all elements. + * + * @param {String|Object} prop + * @param {String} val + * @param {Number} idx - optional index within the selection + * @return {self} + * @api private + */ + +function setCss(el, prop, val, idx) { + if ('string' == typeof prop) { + var styles = getCss(el); + if (typeof val === 'function') { + val = val.call(el, idx, styles[prop]); + } + + if (val === '') { + delete styles[prop]; + } else if (val != null) { + styles[prop] = val; + } + + el.attribs.style = stringify(styles); + } else if ('object' == typeof prop) { + Object.keys(prop).forEach(function(k){ + setCss(el, k, prop[k]); + }); + } +} + +/** + * Get parsed styles of the first element. + * + * @param {String} prop + * @return {Object} + * @api private + */ + +function getCss(el, prop) { + var styles = parse(el.attribs.style); + if (typeof prop === 'string') { + return styles[prop]; + } else if (Array.isArray(prop)) { + return _.pick(styles, prop); + } else { + return styles; + } +} + +/** + * Stringify `obj` to styles. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function stringify(obj) { + return Object.keys(obj || {}) + .reduce(function(str, prop){ + return str += '' + + (str ? ' ' : '') + + prop + + ': ' + + obj[prop] + + ';'; + }, ''); +} + +/** + * Parse `styles`. + * + * @param {String} styles + * @return {Object} + * @api private + */ + +function parse(styles) { + styles = (styles || '').trim(); + + if (!styles) return {}; + + return styles + .split(';') + .reduce(function(obj, str){ + var n = str.indexOf(':'); + // skip if there is no :, or if it is the first/last character + if (n < 1 || n === str.length-1) return obj; + obj[str.slice(0,n).trim()] = str.slice(n+1).trim(); + return obj; + }, {}); +} + + +/***/ }), + +/***/ 95954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => { + +// https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js +// https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js +var submittableSelector = 'input,select,textarea,keygen', + r20 = /%20/g, + rCRLF = /\r?\n/g, + _ = { + map: __nccwpck_require2_(78101) + }; + +exports.serialize = function() { + // Convert form elements into name/value objects + var arr = this.serializeArray(); + + // Serialize each element into a key/value string + var retArr = _.map(arr, function(data) { + return encodeURIComponent(data.name) + '=' + encodeURIComponent(data.value); + }); + + // Return the resulting serialization + return retArr.join('&').replace(r20, '+'); +}; + +exports.serializeArray = function() { + // Resolve all form elements from either forms or collections of form elements + var Cheerio = this.constructor; + return this.map(function() { + var elem = this; + var $elem = Cheerio(elem); + if (elem.name === 'form') { + return $elem.find(submittableSelector).toArray(); + } else { + return $elem.filter(submittableSelector).toArray(); + } + }).filter( + // Verify elements have a name (`attr.name`) and are not disabled (`:disabled`) + '[name!=""]:not(:disabled)' + // and cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`) + + ':not(:submit, :button, :image, :reset, :file)' + // and are either checked/don't have a checkable state + + ':matches([checked], :not(:checkbox, :radio))' + // Convert each of the elements to its value(s) + ).map(function(i, elem) { + var $elem = Cheerio(elem); + var name = $elem.attr('name'); + var value = $elem.val(); + + // If there is no value set (e.g. `undefined`, `null`), then default value to empty + if (value == null) { + value = ''; + } + + // If we have an array of values (e.g. `