diff --git a/README.md b/README.md index 1bd83f265..a7f4e993e 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,47 @@ jobs: - run: npm test ``` +Publish to npmjs and GPR with npm: +```yaml +steps: +- uses: actions/checkout@master +- uses: actions/setup-node@v1 + with: + version: '10.x' + registry-url: 'https://registry.npmjs.org' +- run: npm install +- run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +- uses: actions/setup-node@v1 + with: + registry-url: 'https://npm.pkg.github.com' +- run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + +Publish to npmjs and GPR with yarn: +```yaml +steps: +- uses: actions/checkout@master +- uses: actions/setup-node@v1 + with: + version: '10.x' + registry-url: +- run: npm install -g yarn +- run: yarn install +- run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }} +- uses: actions/setup-node@v1 + with: + registry-url: 'https://npm.pkg.github.com' +- run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + # License The scripts and documentation in this project are released under the [MIT License](LICENSE) diff --git a/__tests__/__snapshots__/authutil.test.ts.snap b/__tests__/__snapshots__/authutil.test.ts.snap new file mode 100644 index 000000000..99174a678 --- /dev/null +++ b/__tests__/__snapshots__/authutil.test.ts.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`installer tests Appends trailing slash to registry 1`] = ` +"//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN} +registry=https://registry.npmjs.org/" +`; + +exports[`installer tests Automatically configures GPR scope 1`] = ` +"npm.pkg.github.com/:_authToken=\${NODE_AUTH_TOKEN} +@owner:registry=npm.pkg.github.com/" +`; + +exports[`installer tests Configures scoped npm registries 1`] = ` +"//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN} +@myScope:registry=https://registry.npmjs.org/" +`; + +exports[`installer tests Sets up npmrc for npmjs 1`] = ` +"//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN} +registry=https://registry.npmjs.org/" +`; diff --git a/__tests__/authutil.test.ts b/__tests__/authutil.test.ts new file mode 100644 index 000000000..3dab9078f --- /dev/null +++ b/__tests__/authutil.test.ts @@ -0,0 +1,62 @@ +import io = require('@actions/io'); +import fs = require('fs'); +import path = require('path'); + +const tempDir = path.join( + __dirname, + 'runner', + path.join( + Math.random() + .toString(36) + .substring(7) + ), + 'temp' +); + +const rcFile = path.join(tempDir, '.npmrc'); + +process.env['GITHUB_REPOSITORY'] = 'owner/repo'; +process.env['RUNNER_TEMP'] = tempDir; +import * as auth from '../src/authutil'; + +describe('installer tests', () => { + beforeAll(async () => { + await io.rmRF(tempDir); + await io.mkdirP(tempDir); + }, 100000); + + beforeEach(() => { + if (fs.existsSync(rcFile)) { + fs.unlinkSync(rcFile); + } + process.env['INPUT_SCOPE'] = ''; + }); + + it('Sets up npmrc for npmjs', async () => { + await auth.configAuthentication('https://registry.npmjs.org/'); + expect(fs.existsSync(rcFile)).toBe(true); + expect(fs.readFileSync(rcFile, {encoding: 'utf8'})).toMatchSnapshot(); + }); + + it('Appends trailing slash to registry', async () => { + await auth.configAuthentication('https://registry.npmjs.org'); + + expect(fs.existsSync(rcFile)).toBe(true); + expect(fs.readFileSync(rcFile, {encoding: 'utf8'})).toMatchSnapshot(); + }); + + it('Configures scoped npm registries', async () => { + process.env['INPUT_SCOPE'] = 'myScope'; + await auth.configAuthentication('https://registry.npmjs.org'); + + expect(fs.existsSync(rcFile)).toBe(true); + expect(fs.readFileSync(rcFile, {encoding: 'utf8'})).toMatchSnapshot(); + }); + + it('Automatically configures GPR scope', async () => { + await auth.configAuthentication('npm.pkg.github.com'); + + expect(fs.existsSync(rcFile)).toBe(true); + expect(fs.readFileSync(rcFile, {encoding: 'utf8'})).toMatchSnapshot(); + }); +}); diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index e2aa65367..e0ada3252 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -4,7 +4,7 @@ import os = require('os'); import path = require('path'); const toolDir = path.join( - process.cwd(), + __dirname, 'runner', path.join( Math.random() @@ -14,7 +14,7 @@ const toolDir = path.join( 'tools' ); const tempDir = path.join( - process.cwd(), + __dirname, 'runner', path.join( Math.random() @@ -36,15 +36,6 @@ describe('installer tests', () => { await io.rmRF(tempDir); }, 100000); - afterAll(async () => { - try { - await io.rmRF(toolDir); - await io.rmRF(tempDir); - } catch { - console.log('Failed to remove test directories'); - } - }, 100000); - it('Acquires version of node if no matching version is installed', async () => { await installer.getNode('10.16.0'); const nodeDir = path.join(toolDir, 'node', '10.16.0', os.arch()); diff --git a/action.yml b/action.yml index 0d97307fc..3fed3dd58 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,10 @@ inputs: version: description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0, lts' default: '10.x' + registry-url: + description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN' + scope: + description: 'Optional scope for authenticating against scoped registries' runs: using: 'node12' main: 'lib/setup-node.js' diff --git a/lib/authutil.js b/lib/authutil.js new file mode 100644 index 000000000..d428b4e4e --- /dev/null +++ b/lib/authutil.js @@ -0,0 +1,52 @@ +"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 }); +const fs = __importStar(require("fs")); +const os = __importStar(require("os")); +const path = __importStar(require("path")); +const core = __importStar(require("@actions/core")); +const github = __importStar(require("@actions/github")); +function configAuthentication(registryUrl) { + const npmrc = path.resolve(process.env['RUNNER_TEMP'] || process.cwd(), '.npmrc'); + if (!registryUrl.endsWith('/')) { + registryUrl += '/'; + } + writeRegistryToFile(registryUrl, npmrc); +} +exports.configAuthentication = configAuthentication; +function writeRegistryToFile(registryUrl, fileLocation) { + let scope = core.getInput('scope'); + if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) { + scope = github.context.repo.owner; + } + if (scope && scope[0] != '@') { + scope = '@' + scope; + } + core.debug(`Setting auth in ${fileLocation}`); + let newContents = ''; + if (fs.existsSync(fileLocation)) { + const curContents = fs.readFileSync(fileLocation, 'utf8'); + curContents.split(os.EOL).forEach((line) => { + // Add current contents unless they are setting the registry + if (!line.toLowerCase().startsWith('registry')) { + newContents += line + os.EOL; + } + }); + } + // Remove http: or https: from front of registry. + const authString = registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}'; + const registryString = scope + ? `${scope}:registry=${registryUrl}` + : `registry=${registryUrl}`; + newContents += `${authString}${os.EOL}${registryString}`; + fs.writeFileSync(fileLocation, newContents); + core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation); + // Export empty node_auth_token so npm doesn't complain about not being able to find it + core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX'); +} diff --git a/lib/setup-node.js b/lib/setup-node.js index b59c4b3d4..974936f36 100644 --- a/lib/setup-node.js +++ b/lib/setup-node.js @@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); const installer = __importStar(require("./installer")); +const auth = __importStar(require("./authutil")); const path = __importStar(require("path")); function run() { return __awaiter(this, void 0, void 0, function* () { @@ -30,6 +31,10 @@ function run() { // TODO: installer doesn't support proxy yield installer.getNode(version); } + const registryUrl = core.getInput('registry-url'); + if (registryUrl) { + auth.configAuthentication(registryUrl); + } // TODO: setup proxy from runner proxy config const matchersPath = path.join(__dirname, '..', '.github'); console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`); diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 100644 index 000000000..cbe872c61 --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../which/bin/which" "$@" + ret=$? +else + node "$basedir/../which/bin/which" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/which.cmd b/node_modules/.bin/which.cmd new file mode 100644 index 000000000..588f44d68 --- /dev/null +++ b/node_modules/.bin/which.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\which\bin\which" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\which\bin\which" %* +) \ No newline at end of file diff --git a/node_modules/@actions/github/README.md b/node_modules/@actions/github/README.md new file mode 100644 index 000000000..60b5307f7 --- /dev/null +++ b/node_modules/@actions/github/README.md @@ -0,0 +1,48 @@ +# `@actions/github` + +> A hydrated Octokit client. + +## Usage + +Returns an [Octokit SDK] client. See https://octokit.github.io/rest.js for the API. + +``` +const github = require('@actions/github'); +const core = require('@actions/core'); + +// This should be a token with access to your repository scoped in as a secret. +const myToken = core.getInput('myToken'); + +const octokit = new github.GitHub(myToken); + +const pulls = await octokit.pulls.get({ + owner: 'octokit', + repo: 'rest.js', + pull_number: 123, + mediaType: { + format: 'diff' + } +}); + +console.log(pulls); +``` + +You can also make GraphQL requests: + +``` +const result = await octokit.graphql(query, variables); +``` + +Finally, you can get the context of the current action: + +``` +const github = require('@actions/github'); + +const context = github.context; + +const newIssue = await octokit.issues.create({ + ...context.repo, + title: 'New issue!', + body: 'Hello Universe!' +}); +``` diff --git a/node_modules/@actions/github/lib/context.d.ts b/node_modules/@actions/github/lib/context.d.ts new file mode 100644 index 000000000..3ee758334 --- /dev/null +++ b/node_modules/@actions/github/lib/context.d.ts @@ -0,0 +1,26 @@ +import { WebhookPayload } from './interfaces'; +export declare class Context { + /** + * Webhook payload object that triggered the workflow + */ + payload: WebhookPayload; + eventName: string; + sha: string; + ref: string; + workflow: string; + action: string; + actor: string; + /** + * Hydrate the context from the environment + */ + constructor(); + readonly issue: { + owner: string; + repo: string; + number: number; + }; + readonly repo: { + owner: string; + repo: string; + }; +} diff --git a/node_modules/@actions/github/lib/context.js b/node_modules/@actions/github/lib/context.js new file mode 100644 index 000000000..e9bdbca8b --- /dev/null +++ b/node_modules/@actions/github/lib/context.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/* eslint-disable @typescript-eslint/no-require-imports */ +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + this.payload = process.env.GITHUB_EVENT_PATH + ? require(process.env.GITHUB_EVENT_PATH) + : {}; + 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({}, this.repo, { number: (payload.issue || payload.pullRequest || 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 \ No newline at end of file diff --git a/node_modules/@actions/github/lib/context.js.map b/node_modules/@actions/github/lib/context.js.map new file mode 100644 index 000000000..c63ca9ea4 --- /dev/null +++ b/node_modules/@actions/github/lib/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;AAGA,0DAA0D;AAE1D,MAAa,OAAO;IAalB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB;YAC1C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;YACxC,CAAC,CAAC,EAAE,CAAA;QACN,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAA;QACxD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAyB,CAAA;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAuB,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;IACjD,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,yBACK,IAAI,CAAC,IAAI,IACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,CAAC,MAAM,IACjE;IACH,CAAC;IAED,IAAI,IAAI;QACN,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC9D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AAtDD,0BAsDC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.d.ts b/node_modules/@actions/github/lib/github.d.ts new file mode 100644 index 000000000..7626ec682 --- /dev/null +++ b/node_modules/@actions/github/lib/github.d.ts @@ -0,0 +1,8 @@ +import { GraphQlQueryResponse, Variables } from '@octokit/graphql'; +import Octokit from '@octokit/rest'; +import * as Context from './context'; +export declare const context: Context.Context; +export declare class GitHub extends Octokit { + graphql: (query: string, variables?: Variables) => Promise; + constructor(token: string); +} diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js new file mode 100644 index 000000000..e3779550d --- /dev/null +++ b/node_modules/@actions/github/lib/github.js @@ -0,0 +1,29 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +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 = require("@octokit/graphql"); +const rest_1 = __importDefault(require("@octokit/rest")); +const Context = __importStar(require("./context")); +// We need this in order to extend Octokit +rest_1.default.prototype = new rest_1.default(); +exports.context = new Context.Context(); +class GitHub extends rest_1.default { + constructor(token) { + super({ auth: `token ${token}` }); + this.graphql = graphql_1.defaults({ + headers: { authorization: `token ${token}` } + }); + } +} +exports.GitHub = GitHub; +//# sourceMappingURL=github.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.js.map b/node_modules/@actions/github/lib/github.js.map new file mode 100644 index 000000000..2b887d162 --- /dev/null +++ b/node_modules/@actions/github/lib/github.js.map @@ -0,0 +1 @@ +{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gGAAgG;AAChG,8CAA0E;AAC1E,yDAAmC;AACnC,mDAAoC;AAEpC,0CAA0C;AAC1C,cAAO,CAAC,SAAS,GAAG,IAAI,cAAO,EAAE,CAAA;AAEpB,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAa,MAAO,SAAQ,cAAO;IAMjC,YAAY,KAAa;QACvB,KAAK,CAAC,EAAC,IAAI,EAAE,SAAS,KAAK,EAAE,EAAC,CAAC,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,kBAAQ,CAAC;YACtB,OAAO,EAAE,EAAC,aAAa,EAAE,SAAS,KAAK,EAAE,EAAC;SAC3C,CAAC,CAAA;IACJ,CAAC;CACF;AAZD,wBAYC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.d.ts b/node_modules/@actions/github/lib/interfaces.d.ts new file mode 100644 index 000000000..23788cced --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.d.ts @@ -0,0 +1,36 @@ +export interface PayloadRepository { + [key: string]: any; + full_name?: string; + name: string; + owner: { + [key: string]: any; + login: string; + name?: string; + }; + html_url?: string; +} +export interface WebhookPayload { + [key: string]: any; + repository?: PayloadRepository; + issue?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + pull_request?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + sender?: { + [key: string]: any; + type: string; + }; + action?: string; + installation?: { + id: number; + [key: string]: any; + }; +} diff --git a/node_modules/@actions/github/lib/interfaces.js b/node_modules/@actions/github/lib/interfaces.js new file mode 100644 index 000000000..a660b5e30 --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js @@ -0,0 +1,4 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.js.map b/node_modules/@actions/github/lib/interfaces.js.map new file mode 100644 index 000000000..dc2c9609f --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,uDAAuD"} \ No newline at end of file diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json new file mode 100644 index 000000000..fbcde9fd4 --- /dev/null +++ b/node_modules/@actions/github/package.json @@ -0,0 +1,68 @@ +{ + "_from": "file:toolkit\\actions-github-0.0.0.tgz", + "_id": "@actions/github@0.0.0", + "_inBundle": false, + "_integrity": "sha512-CByX5VIagC5BqGwsHD9Qt5MfN+H6GDC9qQl+MIUipaHTc89sUG/vAY/xQDS9vxuuRwrxbdERwKO3dR6U1BSziw==", + "_location": "/@actions/github", + "_phantomChildren": {}, + "_requested": { + "type": "file", + "where": "C:\\Users\\Administrator\\Documents\\setup-node", + "raw": "@actions/github@file:toolkit/actions-github-0.0.0.tgz", + "name": "@actions/github", + "escapedName": "@actions%2fgithub", + "scope": "@actions", + "rawSpec": "file:toolkit/actions-github-0.0.0.tgz", + "saveSpec": "file:toolkit\\actions-github-0.0.0.tgz", + "fetchSpec": "C:\\Users\\Administrator\\Documents\\setup-node\\toolkit\\actions-github-0.0.0.tgz" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "C:\\Users\\Administrator\\Documents\\setup-node\\toolkit\\actions-github-0.0.0.tgz", + "_shasum": "d9a87b3682d66d032fffcaff1adcdb2decd92b81", + "_spec": "@actions/github@file:toolkit/actions-github-0.0.0.tgz", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@octokit/graphql": "^2.0.1", + "@octokit/rest": "^16.15.0" + }, + "deprecated": false, + "description": "Actions github lib", + "devDependencies": { + "jest": "^24.7.1" + }, + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", + "keywords": [ + "github", + "actions" + ], + "license": "MIT", + "main": "lib/github.js", + "name": "@actions/github", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git" + }, + "scripts": { + "build": "tsc", + "test": "jest", + "tsc": "tsc" + }, + "version": "0.0.0" +} diff --git a/node_modules/@actions/io/README.md b/node_modules/@actions/io/README.md index 22f0901d1..91502b043 100644 --- a/node_modules/@actions/io/README.md +++ b/node_modules/@actions/io/README.md @@ -50,4 +50,4 @@ const io = require('@actions/io'); const pythonPath: string = await io.which('python', true) await exec.exec(`"${pythonPath}"`, ['main.py']); -``` +``` \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.js b/node_modules/@actions/tool-cache/lib/tool-cache.js index 3c121652e..7ac1ae16f 100644 --- a/node_modules/@actions/tool-cache/lib/tool-cache.js +++ b/node_modules/@actions/tool-cache/lib/tool-cache.js @@ -433,4 +433,4 @@ function _evaluateVersions(versions, versionSpec) { } return version; } -//# sourceMappingURL=tool-cache.js.map \ No newline at end of file +//# sourceMappingURL=tool-cache.js.map diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/node_modules/@octokit/endpoint/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit 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/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/endpoint/README.md new file mode 100644 index 000000000..ad26c377c --- /dev/null +++ b/node_modules/@octokit/endpoint/README.md @@ -0,0 +1,421 @@ +# endpoint.js + +> Turns GitHub REST API endpoints into generic request options + +[![@latest](https://img.shields.io/npm/v/@octokit/endpoint.svg)](https://www.npmjs.com/package/@octokit/endpoint) +[![Build Status](https://travis-ci.org/octokit/endpoint.js.svg?branch=master)](https://travis-ci.org/octokit/endpoint.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/endpoint.js.svg)](https://greenkeeper.io/) + +`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library. + + + + +- [Usage](#usage) +- [API](#api) + - [endpoint()](#endpoint) + - [endpoint.defaults()](#endpointdefaults) + - [endpoint.DEFAULTS](#endpointdefaults) + - [endpoint.merge()](#endpointmerge) + - [endpoint.parse()](#endpointparse) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Usage + + + + + + +
+Browsers + +Load @octokit/endpoint directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/endpoint + +```js +const { endpoint } = require("@octokit/endpoint"); +// or: import { endpoint } from "@octokit/endpoint"; +``` + +
+ +Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories) + +```js +const requestOptions = endpoint("GET /orgs/:org/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); +``` + +The resulting `requestOptions` looks as follows + +```json +{ + "method": "GET", + "url": "https://api.github.com/orgs/octokit/repos?type=private", + "headers": { + "accept": "application/vnd.github.v3+json", + "authorization": "token 0000000000000000000000000000000000000001", + "user-agent": "octokit/endpoint.js v1.2.3" + } +} +``` + +You can pass `requestOptions` to commen request libraries + +```js +const { url, ...options } = requestOptions; +// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +fetch(url, options); +// using with request (https://github.com/request/request) +request(requestOptions); +// using with got (https://github.com/sindresorhus/got) +got[options.method](url, options); +// using with axios +axios(requestOptions); +``` + +## API + +### `endpoint(route, options)` or `endpoint(options)` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/:org. If it’s set to a URL, only the method defaults to GET. +
+ options.method + + String + + Required unless route is set. Any supported http verb. Defaults to GET. +
+ options.url + + String + + Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders, + e.g., /orgs/:org/repos. The url is parsed using url-template. +
+ options.baseUrl + + String + + Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
+
+ options.mediaType.format + + String + + Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value. +
+ options.mediaType.previews + + Array of Strings + + Name of previews, such as mercy, symmetra, or scarlet-witch. See API Previews. If options.mediaType.previews was set as default, the new previews will be merged into the default ones. Setting options.mediaType.previews will amend the headers.accept value. options.mediaType.previews will be merged with an existing array set using .defaults(). +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below. +
+ options.request + + Object + + Pass custom meta information for the request. The request object will be returned as is. +
+ +All other options will be passed depending on the `method` and `url` options. + +1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. +2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. +3. Otherwise, the parameter is passed in the request body as a JSON key. + +**Result** + +`endpoint()` is a synchronous method and returns an object with the following keys: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
methodStringThe http method. Always lowercase.
urlStringThe url with placeholders replaced with passed parameters.
headersObjectAll header names are lowercased.
bodyAnyThe request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
requestObjectRequest meta option, it will be returned as it was passed into endpoint()
+ +### `endpoint.defaults()` + +Override or set default options. Example: + +```js +const request = require("request"); +const myEndpoint = require("@octokit/endpoint").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-project", + per_page: 100 +}); + +request(myEndpoint(`GET /orgs/:org/repos`)); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +const myProjectEndpointWithAuth = myProjectEndpoint.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001` + } +}); +``` + +`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +### `endpoint.DEFAULTS` + +The current default options. + +```js +endpoint.DEFAULTS.baseUrl; // https://api.github.com +const myEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3" +}); +myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3 +``` + +### `endpoint.merge(route, options)` or `endpoint.merge(options)` + +Get the defaulted endpoint options, but without parsing them into request options: + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +myProjectEndpoint.merge("GET /orgs/:org/repos", { + headers: { + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-secret-project", + type: "private" +}); + +// { +// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3', +// method: 'GET', +// url: '/orgs/:org/repos', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: `token 0000000000000000000000000000000000000001`, +// 'user-agent': 'myApp/1.2.3' +// }, +// org: 'my-secret-project', +// type: 'private' +// } +``` + +### `endpoint.parse()` + +Stateless method to turn endpoint options into request options. Calling +`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const options = endpoint("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain" + } +}); + +// options is +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +endpoint( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001` + }, + data: "Hello, world!" + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 000000000..127b9ac2e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,197 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deepmerge = _interopDefault(require('deepmerge')); +var isPlainObject = _interopDefault(require('is-plain-object')); +var urlTemplate = _interopDefault(require('url-template')); +var getUserAgent = _interopDefault(require('universal-user-agent')); + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +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 = route || {}; + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); + const mergedOptions = deepmerge.all([defaults, options].filter(Boolean), { + isMergeableObject: isPlainObject + }); // 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; + }, {}); +} + +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 = urlTemplate.parse(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 = "0.0.0-development"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +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; diff --git a/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 000000000..0fa09cc2b --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,15 @@ +import getUserAgent from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +export const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; diff --git a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 000000000..5763758fa --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js @@ -0,0 +1,5 @@ +import { merge } from "./merge"; +import { parse } from "./parse"; +export function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} diff --git a/node_modules/@octokit/endpoint/dist-src/generated/routes.js b/node_modules/@octokit/endpoint/dist-src/generated/routes.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 000000000..599917f98 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/index.js @@ -0,0 +1,3 @@ +import { withDefaults } from "./with-defaults"; +import { DEFAULTS } from "./defaults"; +export const endpoint = withDefaults(null, DEFAULTS); diff --git a/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 000000000..8a4cfd80f --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,25 @@ +import deepmerge from "deepmerge"; +import isPlainObject from "is-plain-object"; +import { lowercaseKeys } from "./util/lowercase-keys"; +export 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 = route || {}; + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + const mergedOptions = deepmerge.all([defaults, options].filter(Boolean), { + isMergeableObject: isPlainObject + }); + // 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; +} diff --git a/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 000000000..e83b521ca --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,81 @@ +import urlTemplate from "url-template"; +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +export 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 = urlTemplate.parse(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); +} diff --git a/node_modules/@octokit/endpoint/dist-src/types.js b/node_modules/@octokit/endpoint/dist-src/types.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 000000000..a78812f77 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,21 @@ +export 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("&")); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 000000000..3e75db283 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js @@ -0,0 +1,11 @@ +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +export function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 000000000..078064255 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js @@ -0,0 +1,9 @@ +export function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 000000000..7e1aa6b4b --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/omit.js @@ -0,0 +1,8 @@ +export function omit(object, keysToOmit) { + return Object.keys(object) + .filter(option => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 000000000..86383b116 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 000000000..9a1c886ab --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/with-defaults.js @@ -0,0 +1,13 @@ +import { endpointWithDefaults } from "./endpoint-with-defaults"; +import { merge } from "./merge"; +import { parse } from "./parse"; +export 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 + }); +} diff --git a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 000000000..7984bd2e7 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { Defaults } from "./types"; +export declare const DEFAULTS: Defaults; diff --git a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 000000000..406b4cc93 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,2 @@ +import { Defaults, Endpoint, RequestOptions, Route, Parameters } from "./types"; +export declare function endpointWithDefaults(defaults: Defaults, route: Route | Endpoint, options?: Parameters): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts b/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts new file mode 100644 index 000000000..dbbd82dde --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts @@ -0,0 +1,6745 @@ +import { Url, Headers, EndpointRequestOptions } from "../types"; +export interface Routes { + "GET /events": [ActivityListPublicEventsEndpoint, ActivityListPublicEventsRequestOptions]; + "GET /repos/:owner/:repo/events": [ActivityListRepoEventsEndpoint, ActivityListRepoEventsRequestOptions]; + "GET /networks/:owner/:repo/events": [ActivityListPublicEventsForRepoNetworkEndpoint, ActivityListPublicEventsForRepoNetworkRequestOptions]; + "GET /orgs/:org/events": [ActivityListPublicEventsForOrgEndpoint, ActivityListPublicEventsForOrgRequestOptions]; + "GET /users/:username/received_events": [ActivityListReceivedEventsForUserEndpoint, ActivityListReceivedEventsForUserRequestOptions]; + "GET /users/:username/received_events/public": [ActivityListReceivedPublicEventsForUserEndpoint, ActivityListReceivedPublicEventsForUserRequestOptions]; + "GET /users/:username/events": [ActivityListEventsForUserEndpoint, ActivityListEventsForUserRequestOptions]; + "GET /users/:username/events/public": [ActivityListPublicEventsForUserEndpoint, ActivityListPublicEventsForUserRequestOptions]; + "GET /users/:username/events/orgs/:org": [ActivityListEventsForOrgEndpoint, ActivityListEventsForOrgRequestOptions]; + "GET /feeds": [ActivityListFeedsEndpoint, ActivityListFeedsRequestOptions]; + "GET /notifications": [ActivityListNotificationsEndpoint, ActivityListNotificationsRequestOptions]; + "GET /repos/:owner/:repo/notifications": [ActivityListNotificationsForRepoEndpoint, ActivityListNotificationsForRepoRequestOptions]; + "PUT /notifications": [ActivityMarkAsReadEndpoint, ActivityMarkAsReadRequestOptions]; + "PUT /repos/:owner/:repo/notifications": [ActivityMarkNotificationsAsReadForRepoEndpoint, ActivityMarkNotificationsAsReadForRepoRequestOptions]; + "GET /notifications/threads/:thread_id": [ActivityGetThreadEndpoint, ActivityGetThreadRequestOptions]; + "PATCH /notifications/threads/:thread_id": [ActivityMarkThreadAsReadEndpoint, ActivityMarkThreadAsReadRequestOptions]; + "GET /notifications/threads/:thread_id/subscription": [ActivityGetThreadSubscriptionEndpoint, ActivityGetThreadSubscriptionRequestOptions]; + "PUT /notifications/threads/:thread_id/subscription": [ActivitySetThreadSubscriptionEndpoint, ActivitySetThreadSubscriptionRequestOptions]; + "DELETE /notifications/threads/:thread_id/subscription": [ActivityDeleteThreadSubscriptionEndpoint, ActivityDeleteThreadSubscriptionRequestOptions]; + "GET /repos/:owner/:repo/stargazers": [ActivityListStargazersForRepoEndpoint, ActivityListStargazersForRepoRequestOptions]; + "GET /users/:username/starred": [ActivityListReposStarredByUserEndpoint, ActivityListReposStarredByUserRequestOptions]; + "GET /user/starred": [ActivityListReposStarredByAuthenticatedUserEndpoint, ActivityListReposStarredByAuthenticatedUserRequestOptions]; + "GET /user/starred/:owner/:repo": [ActivityCheckStarringRepoEndpoint, ActivityCheckStarringRepoRequestOptions]; + "PUT /user/starred/:owner/:repo": [ActivityStarRepoEndpoint, ActivityStarRepoRequestOptions]; + "DELETE /user/starred/:owner/:repo": [ActivityUnstarRepoEndpoint, ActivityUnstarRepoRequestOptions]; + "GET /repos/:owner/:repo/subscribers": [ActivityListWatchersForRepoEndpoint, ActivityListWatchersForRepoRequestOptions]; + "GET /users/:username/subscriptions": [ActivityListReposWatchedByUserEndpoint, ActivityListReposWatchedByUserRequestOptions]; + "GET /user/subscriptions": [ActivityListWatchedReposForAuthenticatedUserEndpoint, ActivityListWatchedReposForAuthenticatedUserRequestOptions]; + "GET /repos/:owner/:repo/subscription": [ActivityGetRepoSubscriptionEndpoint, ActivityGetRepoSubscriptionRequestOptions]; + "PUT /repos/:owner/:repo/subscription": [ActivitySetRepoSubscriptionEndpoint, ActivitySetRepoSubscriptionRequestOptions]; + "DELETE /repos/:owner/:repo/subscription": [ActivityDeleteRepoSubscriptionEndpoint, ActivityDeleteRepoSubscriptionRequestOptions]; + "GET /user/subscriptions/:owner/:repo": [ActivityCheckWatchingRepoLegacyEndpoint, ActivityCheckWatchingRepoLegacyRequestOptions]; + "PUT /user/subscriptions/:owner/:repo": [ActivityWatchRepoLegacyEndpoint, ActivityWatchRepoLegacyRequestOptions]; + "DELETE /user/subscriptions/:owner/:repo": [ActivityStopWatchingRepoLegacyEndpoint, ActivityStopWatchingRepoLegacyRequestOptions]; + "GET /apps/:app_slug": [AppsGetBySlugEndpoint, AppsGetBySlugRequestOptions]; + "GET /app": [AppsGetAuthenticatedEndpoint, AppsGetAuthenticatedRequestOptions]; + "GET /app/installations": [AppsListInstallationsEndpoint, AppsListInstallationsRequestOptions]; + "GET /app/installations/:installation_id": [AppsGetInstallationEndpoint, AppsGetInstallationRequestOptions]; + "DELETE /app/installations/:installation_id": [AppsDeleteInstallationEndpoint, AppsDeleteInstallationRequestOptions]; + "POST /app/installations/:installation_id/access_tokens": [AppsCreateInstallationTokenEndpoint, AppsCreateInstallationTokenRequestOptions]; + "GET /orgs/:org/installation": [AppsGetOrgInstallationEndpoint | AppsFindOrgInstallationEndpoint, AppsGetOrgInstallationRequestOptions | AppsFindOrgInstallationRequestOptions]; + "GET /repos/:owner/:repo/installation": [AppsGetRepoInstallationEndpoint | AppsFindRepoInstallationEndpoint, AppsGetRepoInstallationRequestOptions | AppsFindRepoInstallationRequestOptions]; + "GET /users/:username/installation": [AppsGetUserInstallationEndpoint | AppsFindUserInstallationEndpoint, AppsGetUserInstallationRequestOptions | AppsFindUserInstallationRequestOptions]; + "POST /app-manifests/:code/conversions": [AppsCreateFromManifestEndpoint, AppsCreateFromManifestRequestOptions]; + "GET /installation/repositories": [AppsListReposEndpoint, AppsListReposRequestOptions]; + "GET /user/installations": [AppsListInstallationsForAuthenticatedUserEndpoint, AppsListInstallationsForAuthenticatedUserRequestOptions]; + "GET /user/installations/:installation_id/repositories": [AppsListInstallationReposForAuthenticatedUserEndpoint, AppsListInstallationReposForAuthenticatedUserRequestOptions]; + "PUT /user/installations/:installation_id/repositories/:repository_id": [AppsAddRepoToInstallationEndpoint, AppsAddRepoToInstallationRequestOptions]; + "DELETE /user/installations/:installation_id/repositories/:repository_id": [AppsRemoveRepoFromInstallationEndpoint, AppsRemoveRepoFromInstallationRequestOptions]; + "POST /content_references/:content_reference_id/attachments": [AppsCreateContentAttachmentEndpoint, AppsCreateContentAttachmentRequestOptions]; + "GET /marketplace_listing/plans": [AppsListPlansEndpoint, AppsListPlansRequestOptions]; + "GET /marketplace_listing/stubbed/plans": [AppsListPlansStubbedEndpoint, AppsListPlansStubbedRequestOptions]; + "GET /marketplace_listing/plans/:plan_id/accounts": [AppsListAccountsUserOrOrgOnPlanEndpoint, AppsListAccountsUserOrOrgOnPlanRequestOptions]; + "GET /marketplace_listing/stubbed/plans/:plan_id/accounts": [AppsListAccountsUserOrOrgOnPlanStubbedEndpoint, AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions]; + "GET /marketplace_listing/accounts/:account_id": [AppsCheckAccountIsAssociatedWithAnyEndpoint, AppsCheckAccountIsAssociatedWithAnyRequestOptions]; + "GET /marketplace_listing/stubbed/accounts/:account_id": [AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint, AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions]; + "GET /user/marketplace_purchases": [AppsListMarketplacePurchasesForAuthenticatedUserEndpoint, AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions]; + "GET /user/marketplace_purchases/stubbed": [AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint, AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions]; + "POST /repos/:owner/:repo/check-runs": [ChecksCreateEndpoint, ChecksCreateRequestOptions]; + "PATCH /repos/:owner/:repo/check-runs/:check_run_id": [ChecksUpdateEndpoint, ChecksUpdateRequestOptions]; + "GET /repos/:owner/:repo/commits/:ref/check-runs": [ChecksListForRefEndpoint, ChecksListForRefRequestOptions]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs": [ChecksListForSuiteEndpoint, ChecksListForSuiteRequestOptions]; + "GET /repos/:owner/:repo/check-runs/:check_run_id": [ChecksGetEndpoint, ChecksGetRequestOptions]; + "GET /repos/:owner/:repo/check-runs/:check_run_id/annotations": [ChecksListAnnotationsEndpoint, ChecksListAnnotationsRequestOptions]; + "GET /repos/:owner/:repo/check-suites/:check_suite_id": [ChecksGetSuiteEndpoint, ChecksGetSuiteRequestOptions]; + "GET /repos/:owner/:repo/commits/:ref/check-suites": [ChecksListSuitesForRefEndpoint, ChecksListSuitesForRefRequestOptions]; + "PATCH /repos/:owner/:repo/check-suites/preferences": [ChecksSetSuitesPreferencesEndpoint, ChecksSetSuitesPreferencesRequestOptions]; + "POST /repos/:owner/:repo/check-suites": [ChecksCreateSuiteEndpoint, ChecksCreateSuiteRequestOptions]; + "POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest": [ChecksRerequestSuiteEndpoint, ChecksRerequestSuiteRequestOptions]; + "GET /codes_of_conduct": [CodesOfConductListConductCodesEndpoint, CodesOfConductListConductCodesRequestOptions]; + "GET /codes_of_conduct/:key": [CodesOfConductGetConductCodeEndpoint, CodesOfConductGetConductCodeRequestOptions]; + "GET /repos/:owner/:repo/community/code_of_conduct": [CodesOfConductGetForRepoEndpoint, CodesOfConductGetForRepoRequestOptions]; + "GET /emojis": [EmojisGetEndpoint, EmojisGetRequestOptions]; + "GET /users/:username/gists": [GistsListPublicForUserEndpoint, GistsListPublicForUserRequestOptions]; + "GET /gists": [GistsListEndpoint, GistsListRequestOptions]; + "GET /gists/public": [GistsListPublicEndpoint, GistsListPublicRequestOptions]; + "GET /gists/starred": [GistsListStarredEndpoint, GistsListStarredRequestOptions]; + "GET /gists/:gist_id": [GistsGetEndpoint, GistsGetRequestOptions]; + "GET /gists/:gist_id/:sha": [GistsGetRevisionEndpoint, GistsGetRevisionRequestOptions]; + "POST /gists": [GistsCreateEndpoint, GistsCreateRequestOptions]; + "PATCH /gists/:gist_id": [GistsUpdateEndpoint, GistsUpdateRequestOptions]; + "GET /gists/:gist_id/commits": [GistsListCommitsEndpoint, GistsListCommitsRequestOptions]; + "PUT /gists/:gist_id/star": [GistsStarEndpoint, GistsStarRequestOptions]; + "DELETE /gists/:gist_id/star": [GistsUnstarEndpoint, GistsUnstarRequestOptions]; + "GET /gists/:gist_id/star": [GistsCheckIsStarredEndpoint, GistsCheckIsStarredRequestOptions]; + "POST /gists/:gist_id/forks": [GistsForkEndpoint, GistsForkRequestOptions]; + "GET /gists/:gist_id/forks": [GistsListForksEndpoint, GistsListForksRequestOptions]; + "DELETE /gists/:gist_id": [GistsDeleteEndpoint, GistsDeleteRequestOptions]; + "GET /gists/:gist_id/comments": [GistsListCommentsEndpoint, GistsListCommentsRequestOptions]; + "GET /gists/:gist_id/comments/:comment_id": [GistsGetCommentEndpoint, GistsGetCommentRequestOptions]; + "POST /gists/:gist_id/comments": [GistsCreateCommentEndpoint, GistsCreateCommentRequestOptions]; + "PATCH /gists/:gist_id/comments/:comment_id": [GistsUpdateCommentEndpoint, GistsUpdateCommentRequestOptions]; + "DELETE /gists/:gist_id/comments/:comment_id": [GistsDeleteCommentEndpoint, GistsDeleteCommentRequestOptions]; + "GET /repos/:owner/:repo/git/blobs/:file_sha": [GitGetBlobEndpoint, GitGetBlobRequestOptions]; + "POST /repos/:owner/:repo/git/blobs": [GitCreateBlobEndpoint, GitCreateBlobRequestOptions]; + "GET /repos/:owner/:repo/git/commits/:commit_sha": [GitGetCommitEndpoint, GitGetCommitRequestOptions]; + "POST /repos/:owner/:repo/git/commits": [GitCreateCommitEndpoint, GitCreateCommitRequestOptions]; + "GET /repos/:owner/:repo/git/refs/:ref": [GitGetRefEndpoint, GitGetRefRequestOptions]; + "GET /repos/:owner/:repo/git/refs/:namespace": [GitListRefsEndpoint, GitListRefsRequestOptions]; + "POST /repos/:owner/:repo/git/refs": [GitCreateRefEndpoint, GitCreateRefRequestOptions]; + "PATCH /repos/:owner/:repo/git/refs/:ref": [GitUpdateRefEndpoint, GitUpdateRefRequestOptions]; + "DELETE /repos/:owner/:repo/git/refs/:ref": [GitDeleteRefEndpoint, GitDeleteRefRequestOptions]; + "GET /repos/:owner/:repo/git/tags/:tag_sha": [GitGetTagEndpoint, GitGetTagRequestOptions]; + "POST /repos/:owner/:repo/git/tags": [GitCreateTagEndpoint, GitCreateTagRequestOptions]; + "GET /repos/:owner/:repo/git/trees/:tree_sha": [GitGetTreeEndpoint, GitGetTreeRequestOptions]; + "POST /repos/:owner/:repo/git/trees": [GitCreateTreeEndpoint, GitCreateTreeRequestOptions]; + "GET /gitignore/templates": [GitignoreListTemplatesEndpoint, GitignoreListTemplatesRequestOptions]; + "GET /gitignore/templates/:name": [GitignoreGetTemplateEndpoint, GitignoreGetTemplateRequestOptions]; + "GET /orgs/:org/interaction-limits": [InteractionsGetRestrictionsForOrgEndpoint, InteractionsGetRestrictionsForOrgRequestOptions]; + "PUT /orgs/:org/interaction-limits": [InteractionsAddOrUpdateRestrictionsForOrgEndpoint, InteractionsAddOrUpdateRestrictionsForOrgRequestOptions]; + "DELETE /orgs/:org/interaction-limits": [InteractionsRemoveRestrictionsForOrgEndpoint, InteractionsRemoveRestrictionsForOrgRequestOptions]; + "GET /repos/:owner/:repo/interaction-limits": [InteractionsGetRestrictionsForRepoEndpoint, InteractionsGetRestrictionsForRepoRequestOptions]; + "PUT /repos/:owner/:repo/interaction-limits": [InteractionsAddOrUpdateRestrictionsForRepoEndpoint, InteractionsAddOrUpdateRestrictionsForRepoRequestOptions]; + "DELETE /repos/:owner/:repo/interaction-limits": [InteractionsRemoveRestrictionsForRepoEndpoint, InteractionsRemoveRestrictionsForRepoRequestOptions]; + "GET /issues": [IssuesListEndpoint, IssuesListRequestOptions]; + "GET /user/issues": [IssuesListForAuthenticatedUserEndpoint, IssuesListForAuthenticatedUserRequestOptions]; + "GET /orgs/:org/issues": [IssuesListForOrgEndpoint, IssuesListForOrgRequestOptions]; + "GET /repos/:owner/:repo/issues": [IssuesListForRepoEndpoint, IssuesListForRepoRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number": [IssuesGetEndpoint, IssuesGetRequestOptions]; + "POST /repos/:owner/:repo/issues": [IssuesCreateEndpoint, IssuesCreateRequestOptions]; + "PATCH /repos/:owner/:repo/issues/:issue_number": [IssuesUpdateEndpoint, IssuesUpdateRequestOptions]; + "PUT /repos/:owner/:repo/issues/:issue_number/lock": [IssuesLockEndpoint, IssuesLockRequestOptions]; + "DELETE /repos/:owner/:repo/issues/:issue_number/lock": [IssuesUnlockEndpoint, IssuesUnlockRequestOptions]; + "GET /repos/:owner/:repo/assignees": [IssuesListAssigneesEndpoint, IssuesListAssigneesRequestOptions]; + "GET /repos/:owner/:repo/assignees/:assignee": [IssuesCheckAssigneeEndpoint, IssuesCheckAssigneeRequestOptions]; + "POST /repos/:owner/:repo/issues/:issue_number/assignees": [IssuesAddAssigneesEndpoint, IssuesAddAssigneesRequestOptions]; + "DELETE /repos/:owner/:repo/issues/:issue_number/assignees": [IssuesRemoveAssigneesEndpoint, IssuesRemoveAssigneesRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number/comments": [IssuesListCommentsEndpoint, IssuesListCommentsRequestOptions]; + "GET /repos/:owner/:repo/issues/comments": [IssuesListCommentsForRepoEndpoint, IssuesListCommentsForRepoRequestOptions]; + "GET /repos/:owner/:repo/issues/comments/:comment_id": [IssuesGetCommentEndpoint, IssuesGetCommentRequestOptions]; + "POST /repos/:owner/:repo/issues/:issue_number/comments": [IssuesCreateCommentEndpoint, IssuesCreateCommentRequestOptions]; + "PATCH /repos/:owner/:repo/issues/comments/:comment_id": [IssuesUpdateCommentEndpoint, IssuesUpdateCommentRequestOptions]; + "DELETE /repos/:owner/:repo/issues/comments/:comment_id": [IssuesDeleteCommentEndpoint, IssuesDeleteCommentRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number/events": [IssuesListEventsEndpoint, IssuesListEventsRequestOptions]; + "GET /repos/:owner/:repo/issues/events": [IssuesListEventsForRepoEndpoint, IssuesListEventsForRepoRequestOptions]; + "GET /repos/:owner/:repo/issues/events/:event_id": [IssuesGetEventEndpoint, IssuesGetEventRequestOptions]; + "GET /repos/:owner/:repo/labels": [IssuesListLabelsForRepoEndpoint, IssuesListLabelsForRepoRequestOptions]; + "GET /repos/:owner/:repo/labels/:name": [IssuesGetLabelEndpoint, IssuesGetLabelRequestOptions]; + "POST /repos/:owner/:repo/labels": [IssuesCreateLabelEndpoint, IssuesCreateLabelRequestOptions]; + "PATCH /repos/:owner/:repo/labels/:current_name": [IssuesUpdateLabelEndpoint, IssuesUpdateLabelRequestOptions]; + "DELETE /repos/:owner/:repo/labels/:name": [IssuesDeleteLabelEndpoint, IssuesDeleteLabelRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number/labels": [IssuesListLabelsOnIssueEndpoint, IssuesListLabelsOnIssueRequestOptions]; + "POST /repos/:owner/:repo/issues/:issue_number/labels": [IssuesAddLabelsEndpoint, IssuesAddLabelsRequestOptions]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels/:name": [IssuesRemoveLabelEndpoint, IssuesRemoveLabelRequestOptions]; + "PUT /repos/:owner/:repo/issues/:issue_number/labels": [IssuesReplaceLabelsEndpoint, IssuesReplaceLabelsRequestOptions]; + "DELETE /repos/:owner/:repo/issues/:issue_number/labels": [IssuesRemoveLabelsEndpoint, IssuesRemoveLabelsRequestOptions]; + "GET /repos/:owner/:repo/milestones/:milestone_number/labels": [IssuesListLabelsForMilestoneEndpoint, IssuesListLabelsForMilestoneRequestOptions]; + "GET /repos/:owner/:repo/milestones": [IssuesListMilestonesForRepoEndpoint, IssuesListMilestonesForRepoRequestOptions]; + "GET /repos/:owner/:repo/milestones/:milestone_number": [IssuesGetMilestoneEndpoint, IssuesGetMilestoneRequestOptions]; + "POST /repos/:owner/:repo/milestones": [IssuesCreateMilestoneEndpoint, IssuesCreateMilestoneRequestOptions]; + "PATCH /repos/:owner/:repo/milestones/:milestone_number": [IssuesUpdateMilestoneEndpoint, IssuesUpdateMilestoneRequestOptions]; + "DELETE /repos/:owner/:repo/milestones/:milestone_number": [IssuesDeleteMilestoneEndpoint, IssuesDeleteMilestoneRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number/timeline": [IssuesListEventsForTimelineEndpoint, IssuesListEventsForTimelineRequestOptions]; + "GET /licenses": [LicensesListCommonlyUsedEndpoint | LicensesListEndpoint, LicensesListCommonlyUsedRequestOptions | LicensesListRequestOptions]; + "GET /licenses/:license": [LicensesGetEndpoint, LicensesGetRequestOptions]; + "GET /repos/:owner/:repo/license": [LicensesGetForRepoEndpoint, LicensesGetForRepoRequestOptions]; + "POST /markdown": [MarkdownRenderEndpoint, MarkdownRenderRequestOptions]; + "POST /markdown/raw": [MarkdownRenderRawEndpoint, MarkdownRenderRawRequestOptions]; + "GET /meta": [MetaGetEndpoint, MetaGetRequestOptions]; + "POST /orgs/:org/migrations": [MigrationsStartForOrgEndpoint, MigrationsStartForOrgRequestOptions]; + "GET /orgs/:org/migrations": [MigrationsListForOrgEndpoint, MigrationsListForOrgRequestOptions]; + "GET /orgs/:org/migrations/:migration_id": [MigrationsGetStatusForOrgEndpoint, MigrationsGetStatusForOrgRequestOptions]; + "GET /orgs/:org/migrations/:migration_id/archive": [MigrationsGetArchiveForOrgEndpoint, MigrationsGetArchiveForOrgRequestOptions]; + "DELETE /orgs/:org/migrations/:migration_id/archive": [MigrationsDeleteArchiveForOrgEndpoint, MigrationsDeleteArchiveForOrgRequestOptions]; + "DELETE /orgs/:org/migrations/:migration_id/repos/:repo_name/lock": [MigrationsUnlockRepoForOrgEndpoint, MigrationsUnlockRepoForOrgRequestOptions]; + "PUT /repos/:owner/:repo/import": [MigrationsStartImportEndpoint, MigrationsStartImportRequestOptions]; + "GET /repos/:owner/:repo/import": [MigrationsGetImportProgressEndpoint, MigrationsGetImportProgressRequestOptions]; + "PATCH /repos/:owner/:repo/import": [MigrationsUpdateImportEndpoint, MigrationsUpdateImportRequestOptions]; + "GET /repos/:owner/:repo/import/authors": [MigrationsGetCommitAuthorsEndpoint, MigrationsGetCommitAuthorsRequestOptions]; + "PATCH /repos/:owner/:repo/import/authors/:author_id": [MigrationsMapCommitAuthorEndpoint, MigrationsMapCommitAuthorRequestOptions]; + "PATCH /repos/:owner/:repo/import/lfs": [MigrationsSetLfsPreferenceEndpoint, MigrationsSetLfsPreferenceRequestOptions]; + "GET /repos/:owner/:repo/import/large_files": [MigrationsGetLargeFilesEndpoint, MigrationsGetLargeFilesRequestOptions]; + "DELETE /repos/:owner/:repo/import": [MigrationsCancelImportEndpoint, MigrationsCancelImportRequestOptions]; + "POST /user/migrations": [MigrationsStartForAuthenticatedUserEndpoint, MigrationsStartForAuthenticatedUserRequestOptions]; + "GET /user/migrations": [MigrationsListForAuthenticatedUserEndpoint, MigrationsListForAuthenticatedUserRequestOptions]; + "GET /user/migrations/:migration_id": [MigrationsGetStatusForAuthenticatedUserEndpoint, MigrationsGetStatusForAuthenticatedUserRequestOptions]; + "GET /user/migrations/:migration_id/archive": [MigrationsGetArchiveForAuthenticatedUserEndpoint, MigrationsGetArchiveForAuthenticatedUserRequestOptions]; + "DELETE /user/migrations/:migration_id/archive": [MigrationsDeleteArchiveForAuthenticatedUserEndpoint, MigrationsDeleteArchiveForAuthenticatedUserRequestOptions]; + "DELETE /user/migrations/:migration_id/repos/:repo_name/lock": [MigrationsUnlockRepoForAuthenticatedUserEndpoint, MigrationsUnlockRepoForAuthenticatedUserRequestOptions]; + "GET /applications/grants": [OauthAuthorizationsListGrantsEndpoint, OauthAuthorizationsListGrantsRequestOptions]; + "GET /applications/grants/:grant_id": [OauthAuthorizationsGetGrantEndpoint, OauthAuthorizationsGetGrantRequestOptions]; + "DELETE /applications/grants/:grant_id": [OauthAuthorizationsDeleteGrantEndpoint, OauthAuthorizationsDeleteGrantRequestOptions]; + "GET /authorizations": [OauthAuthorizationsListAuthorizationsEndpoint, OauthAuthorizationsListAuthorizationsRequestOptions]; + "GET /authorizations/:authorization_id": [OauthAuthorizationsGetAuthorizationEndpoint, OauthAuthorizationsGetAuthorizationRequestOptions]; + "POST /authorizations": [OauthAuthorizationsCreateAuthorizationEndpoint, OauthAuthorizationsCreateAuthorizationRequestOptions]; + "PUT /authorizations/clients/:client_id": [OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint, OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions]; + "PUT /authorizations/clients/:client_id/:fingerprint": [OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint, OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions]; + "PATCH /authorizations/:authorization_id": [OauthAuthorizationsUpdateAuthorizationEndpoint, OauthAuthorizationsUpdateAuthorizationRequestOptions]; + "DELETE /authorizations/:authorization_id": [OauthAuthorizationsDeleteAuthorizationEndpoint, OauthAuthorizationsDeleteAuthorizationRequestOptions]; + "GET /applications/:client_id/tokens/:access_token": [OauthAuthorizationsCheckAuthorizationEndpoint, OauthAuthorizationsCheckAuthorizationRequestOptions]; + "POST /applications/:client_id/tokens/:access_token": [OauthAuthorizationsResetAuthorizationEndpoint, OauthAuthorizationsResetAuthorizationRequestOptions]; + "DELETE /applications/:client_id/tokens/:access_token": [OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint, OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions]; + "DELETE /applications/:client_id/grants/:access_token": [OauthAuthorizationsRevokeGrantForApplicationEndpoint, OauthAuthorizationsRevokeGrantForApplicationRequestOptions]; + "GET /user/orgs": [OrgsListForAuthenticatedUserEndpoint, OrgsListForAuthenticatedUserRequestOptions]; + "GET /organizations": [OrgsListEndpoint, OrgsListRequestOptions]; + "GET /users/:username/orgs": [OrgsListForUserEndpoint, OrgsListForUserRequestOptions]; + "GET /orgs/:org": [OrgsGetEndpoint, OrgsGetRequestOptions]; + "PATCH /orgs/:org": [OrgsUpdateEndpoint, OrgsUpdateRequestOptions]; + "GET /orgs/:org/credential-authorizations": [OrgsListCredentialAuthorizationsEndpoint, OrgsListCredentialAuthorizationsRequestOptions]; + "DELETE /orgs/:org/credential-authorizations/:credential_id": [OrgsRemoveCredentialAuthorizationEndpoint, OrgsRemoveCredentialAuthorizationRequestOptions]; + "GET /orgs/:org/blocks": [OrgsListBlockedUsersEndpoint, OrgsListBlockedUsersRequestOptions]; + "GET /orgs/:org/blocks/:username": [OrgsCheckBlockedUserEndpoint, OrgsCheckBlockedUserRequestOptions]; + "PUT /orgs/:org/blocks/:username": [OrgsBlockUserEndpoint, OrgsBlockUserRequestOptions]; + "DELETE /orgs/:org/blocks/:username": [OrgsUnblockUserEndpoint, OrgsUnblockUserRequestOptions]; + "GET /orgs/:org/hooks": [OrgsListHooksEndpoint, OrgsListHooksRequestOptions]; + "GET /orgs/:org/hooks/:hook_id": [OrgsGetHookEndpoint, OrgsGetHookRequestOptions]; + "POST /orgs/:org/hooks": [OrgsCreateHookEndpoint, OrgsCreateHookRequestOptions]; + "PATCH /orgs/:org/hooks/:hook_id": [OrgsUpdateHookEndpoint, OrgsUpdateHookRequestOptions]; + "POST /orgs/:org/hooks/:hook_id/pings": [OrgsPingHookEndpoint, OrgsPingHookRequestOptions]; + "DELETE /orgs/:org/hooks/:hook_id": [OrgsDeleteHookEndpoint, OrgsDeleteHookRequestOptions]; + "GET /orgs/:org/members": [OrgsListMembersEndpoint, OrgsListMembersRequestOptions]; + "GET /orgs/:org/members/:username": [OrgsCheckMembershipEndpoint, OrgsCheckMembershipRequestOptions]; + "DELETE /orgs/:org/members/:username": [OrgsRemoveMemberEndpoint, OrgsRemoveMemberRequestOptions]; + "GET /orgs/:org/public_members": [OrgsListPublicMembersEndpoint, OrgsListPublicMembersRequestOptions]; + "GET /orgs/:org/public_members/:username": [OrgsCheckPublicMembershipEndpoint, OrgsCheckPublicMembershipRequestOptions]; + "PUT /orgs/:org/public_members/:username": [OrgsPublicizeMembershipEndpoint, OrgsPublicizeMembershipRequestOptions]; + "DELETE /orgs/:org/public_members/:username": [OrgsConcealMembershipEndpoint, OrgsConcealMembershipRequestOptions]; + "GET /orgs/:org/memberships/:username": [OrgsGetMembershipEndpoint, OrgsGetMembershipRequestOptions]; + "PUT /orgs/:org/memberships/:username": [OrgsAddOrUpdateMembershipEndpoint, OrgsAddOrUpdateMembershipRequestOptions]; + "DELETE /orgs/:org/memberships/:username": [OrgsRemoveMembershipEndpoint, OrgsRemoveMembershipRequestOptions]; + "GET /orgs/:org/invitations/:invitation_id/teams": [OrgsListInvitationTeamsEndpoint, OrgsListInvitationTeamsRequestOptions]; + "GET /orgs/:org/invitations": [OrgsListPendingInvitationsEndpoint, OrgsListPendingInvitationsRequestOptions]; + "POST /orgs/:org/invitations": [OrgsCreateInvitationEndpoint, OrgsCreateInvitationRequestOptions]; + "GET /user/memberships/orgs": [OrgsListMembershipsEndpoint, OrgsListMembershipsRequestOptions]; + "GET /user/memberships/orgs/:org": [OrgsGetMembershipForAuthenticatedUserEndpoint, OrgsGetMembershipForAuthenticatedUserRequestOptions]; + "PATCH /user/memberships/orgs/:org": [OrgsUpdateMembershipEndpoint, OrgsUpdateMembershipRequestOptions]; + "GET /orgs/:org/outside_collaborators": [OrgsListOutsideCollaboratorsEndpoint, OrgsListOutsideCollaboratorsRequestOptions]; + "DELETE /orgs/:org/outside_collaborators/:username": [OrgsRemoveOutsideCollaboratorEndpoint, OrgsRemoveOutsideCollaboratorRequestOptions]; + "PUT /orgs/:org/outside_collaborators/:username": [OrgsConvertMemberToOutsideCollaboratorEndpoint, OrgsConvertMemberToOutsideCollaboratorRequestOptions]; + "GET /repos/:owner/:repo/projects": [ProjectsListForRepoEndpoint, ProjectsListForRepoRequestOptions]; + "GET /orgs/:org/projects": [ProjectsListForOrgEndpoint, ProjectsListForOrgRequestOptions]; + "GET /users/:username/projects": [ProjectsListForUserEndpoint, ProjectsListForUserRequestOptions]; + "GET /projects/:project_id": [ProjectsGetEndpoint, ProjectsGetRequestOptions]; + "POST /repos/:owner/:repo/projects": [ProjectsCreateForRepoEndpoint, ProjectsCreateForRepoRequestOptions]; + "POST /orgs/:org/projects": [ProjectsCreateForOrgEndpoint, ProjectsCreateForOrgRequestOptions]; + "POST /user/projects": [ProjectsCreateForAuthenticatedUserEndpoint, ProjectsCreateForAuthenticatedUserRequestOptions]; + "PATCH /projects/:project_id": [ProjectsUpdateEndpoint, ProjectsUpdateRequestOptions]; + "DELETE /projects/:project_id": [ProjectsDeleteEndpoint, ProjectsDeleteRequestOptions]; + "GET /projects/columns/:column_id/cards": [ProjectsListCardsEndpoint, ProjectsListCardsRequestOptions]; + "GET /projects/columns/cards/:card_id": [ProjectsGetCardEndpoint, ProjectsGetCardRequestOptions]; + "POST /projects/columns/:column_id/cards": [ProjectsCreateCardEndpoint, ProjectsCreateCardRequestOptions]; + "PATCH /projects/columns/cards/:card_id": [ProjectsUpdateCardEndpoint, ProjectsUpdateCardRequestOptions]; + "DELETE /projects/columns/cards/:card_id": [ProjectsDeleteCardEndpoint, ProjectsDeleteCardRequestOptions]; + "POST /projects/columns/cards/:card_id/moves": [ProjectsMoveCardEndpoint, ProjectsMoveCardRequestOptions]; + "GET /projects/:project_id/collaborators": [ProjectsListCollaboratorsEndpoint, ProjectsListCollaboratorsRequestOptions]; + "GET /projects/:project_id/collaborators/:username/permission": [ProjectsReviewUserPermissionLevelEndpoint, ProjectsReviewUserPermissionLevelRequestOptions]; + "PUT /projects/:project_id/collaborators/:username": [ProjectsAddCollaboratorEndpoint, ProjectsAddCollaboratorRequestOptions]; + "DELETE /projects/:project_id/collaborators/:username": [ProjectsRemoveCollaboratorEndpoint, ProjectsRemoveCollaboratorRequestOptions]; + "GET /projects/:project_id/columns": [ProjectsListColumnsEndpoint, ProjectsListColumnsRequestOptions]; + "GET /projects/columns/:column_id": [ProjectsGetColumnEndpoint, ProjectsGetColumnRequestOptions]; + "POST /projects/:project_id/columns": [ProjectsCreateColumnEndpoint, ProjectsCreateColumnRequestOptions]; + "PATCH /projects/columns/:column_id": [ProjectsUpdateColumnEndpoint, ProjectsUpdateColumnRequestOptions]; + "DELETE /projects/columns/:column_id": [ProjectsDeleteColumnEndpoint, ProjectsDeleteColumnRequestOptions]; + "POST /projects/columns/:column_id/moves": [ProjectsMoveColumnEndpoint, ProjectsMoveColumnRequestOptions]; + "GET /repos/:owner/:repo/pulls": [PullsListEndpoint, PullsListRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number": [PullsGetEndpoint, PullsGetRequestOptions]; + "POST /repos/:owner/:repo/pulls": [PullsCreateEndpoint | PullsCreateFromIssueEndpoint, PullsCreateRequestOptions | PullsCreateFromIssueRequestOptions]; + "PUT /repos/:owner/:repo/pulls/:pull_number/update-branch": [PullsUpdateBranchEndpoint, PullsUpdateBranchRequestOptions]; + "PATCH /repos/:owner/:repo/pulls/:pull_number": [PullsUpdateEndpoint, PullsUpdateRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/commits": [PullsListCommitsEndpoint, PullsListCommitsRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/files": [PullsListFilesEndpoint, PullsListFilesRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/merge": [PullsCheckIfMergedEndpoint, PullsCheckIfMergedRequestOptions]; + "PUT /repos/:owner/:repo/pulls/:pull_number/merge": [PullsMergeEndpoint, PullsMergeRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/comments": [PullsListCommentsEndpoint, PullsListCommentsRequestOptions]; + "GET /repos/:owner/:repo/pulls/comments": [PullsListCommentsForRepoEndpoint, PullsListCommentsForRepoRequestOptions]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id": [PullsGetCommentEndpoint, PullsGetCommentRequestOptions]; + "POST /repos/:owner/:repo/pulls/:pull_number/comments": [PullsCreateCommentEndpoint | PullsCreateCommentReplyEndpoint, PullsCreateCommentRequestOptions | PullsCreateCommentReplyRequestOptions]; + "PATCH /repos/:owner/:repo/pulls/comments/:comment_id": [PullsUpdateCommentEndpoint, PullsUpdateCommentRequestOptions]; + "DELETE /repos/:owner/:repo/pulls/comments/:comment_id": [PullsDeleteCommentEndpoint, PullsDeleteCommentRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsListReviewRequestsEndpoint, PullsListReviewRequestsRequestOptions]; + "POST /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsCreateReviewRequestEndpoint, PullsCreateReviewRequestRequestOptions]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsDeleteReviewRequestEndpoint, PullsDeleteReviewRequestRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews": [PullsListReviewsEndpoint, PullsListReviewsRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsGetReviewEndpoint, PullsGetReviewRequestOptions]; + "DELETE /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsDeletePendingReviewEndpoint, PullsDeletePendingReviewRequestOptions]; + "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments": [PullsGetCommentsForReviewEndpoint, PullsGetCommentsForReviewRequestOptions]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews": [PullsCreateReviewEndpoint, PullsCreateReviewRequestOptions]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsUpdateReviewEndpoint, PullsUpdateReviewRequestOptions]; + "POST /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events": [PullsSubmitReviewEndpoint, PullsSubmitReviewRequestOptions]; + "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals": [PullsDismissReviewEndpoint, PullsDismissReviewRequestOptions]; + "GET /rate_limit": [RateLimitGetEndpoint, RateLimitGetRequestOptions]; + "GET /repos/:owner/:repo/comments/:comment_id/reactions": [ReactionsListForCommitCommentEndpoint, ReactionsListForCommitCommentRequestOptions]; + "POST /repos/:owner/:repo/comments/:comment_id/reactions": [ReactionsCreateForCommitCommentEndpoint, ReactionsCreateForCommitCommentRequestOptions]; + "GET /repos/:owner/:repo/issues/:issue_number/reactions": [ReactionsListForIssueEndpoint, ReactionsListForIssueRequestOptions]; + "POST /repos/:owner/:repo/issues/:issue_number/reactions": [ReactionsCreateForIssueEndpoint, ReactionsCreateForIssueRequestOptions]; + "GET /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ReactionsListForIssueCommentEndpoint, ReactionsListForIssueCommentRequestOptions]; + "POST /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ReactionsCreateForIssueCommentEndpoint, ReactionsCreateForIssueCommentRequestOptions]; + "GET /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ReactionsListForPullRequestReviewCommentEndpoint, ReactionsListForPullRequestReviewCommentRequestOptions]; + "POST /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ReactionsCreateForPullRequestReviewCommentEndpoint, ReactionsCreateForPullRequestReviewCommentRequestOptions]; + "GET /teams/:team_id/discussions/:discussion_number/reactions": [ReactionsListForTeamDiscussionEndpoint, ReactionsListForTeamDiscussionRequestOptions]; + "POST /teams/:team_id/discussions/:discussion_number/reactions": [ReactionsCreateForTeamDiscussionEndpoint, ReactionsCreateForTeamDiscussionRequestOptions]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ReactionsListForTeamDiscussionCommentEndpoint, ReactionsListForTeamDiscussionCommentRequestOptions]; + "POST /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ReactionsCreateForTeamDiscussionCommentEndpoint, ReactionsCreateForTeamDiscussionCommentRequestOptions]; + "DELETE /reactions/:reaction_id": [ReactionsDeleteEndpoint, ReactionsDeleteRequestOptions]; + "GET /user/repos": [ReposListEndpoint, ReposListRequestOptions]; + "GET /users/:username/repos": [ReposListForUserEndpoint, ReposListForUserRequestOptions]; + "GET /orgs/:org/repos": [ReposListForOrgEndpoint, ReposListForOrgRequestOptions]; + "GET /repositories": [ReposListPublicEndpoint, ReposListPublicRequestOptions]; + "POST /user/repos": [ReposCreateForAuthenticatedUserEndpoint, ReposCreateForAuthenticatedUserRequestOptions]; + "POST /orgs/:org/repos": [ReposCreateInOrgEndpoint, ReposCreateInOrgRequestOptions]; + "POST /repos/:template_owner/:template_repo/generate": [ReposCreateUsingTemplateEndpoint, ReposCreateUsingTemplateRequestOptions]; + "GET /repos/:owner/:repo": [ReposGetEndpoint, ReposGetRequestOptions]; + "PATCH /repos/:owner/:repo": [ReposUpdateEndpoint, ReposUpdateRequestOptions]; + "GET /repos/:owner/:repo/topics": [ReposListTopicsEndpoint, ReposListTopicsRequestOptions]; + "PUT /repos/:owner/:repo/topics": [ReposReplaceTopicsEndpoint, ReposReplaceTopicsRequestOptions]; + "GET /repos/:owner/:repo/vulnerability-alerts": [ReposCheckVulnerabilityAlertsEndpoint, ReposCheckVulnerabilityAlertsRequestOptions]; + "PUT /repos/:owner/:repo/vulnerability-alerts": [ReposEnableVulnerabilityAlertsEndpoint, ReposEnableVulnerabilityAlertsRequestOptions]; + "DELETE /repos/:owner/:repo/vulnerability-alerts": [ReposDisableVulnerabilityAlertsEndpoint, ReposDisableVulnerabilityAlertsRequestOptions]; + "PUT /repos/:owner/:repo/automated-security-fixes": [ReposEnableAutomatedSecurityFixesEndpoint, ReposEnableAutomatedSecurityFixesRequestOptions]; + "DELETE /repos/:owner/:repo/automated-security-fixes": [ReposDisableAutomatedSecurityFixesEndpoint, ReposDisableAutomatedSecurityFixesRequestOptions]; + "GET /repos/:owner/:repo/contributors": [ReposListContributorsEndpoint, ReposListContributorsRequestOptions]; + "GET /repos/:owner/:repo/languages": [ReposListLanguagesEndpoint, ReposListLanguagesRequestOptions]; + "GET /repos/:owner/:repo/teams": [ReposListTeamsEndpoint, ReposListTeamsRequestOptions]; + "GET /repos/:owner/:repo/tags": [ReposListTagsEndpoint, ReposListTagsRequestOptions]; + "DELETE /repos/:owner/:repo": [ReposDeleteEndpoint, ReposDeleteRequestOptions]; + "POST /repos/:owner/:repo/transfer": [ReposTransferEndpoint, ReposTransferRequestOptions]; + "GET /repos/:owner/:repo/branches": [ReposListBranchesEndpoint, ReposListBranchesRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch": [ReposGetBranchEndpoint, ReposGetBranchRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection": [ReposGetBranchProtectionEndpoint, ReposGetBranchProtectionRequestOptions]; + "PUT /repos/:owner/:repo/branches/:branch/protection": [ReposUpdateBranchProtectionEndpoint, ReposUpdateBranchProtectionRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection": [ReposRemoveBranchProtectionEndpoint, ReposRemoveBranchProtectionRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposGetProtectedBranchRequiredStatusChecksEndpoint, ReposGetProtectedBranchRequiredStatusChecksRequestOptions]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposUpdateProtectedBranchRequiredStatusChecksEndpoint, ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposRemoveProtectedBranchRequiredStatusChecksEndpoint, ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposListProtectedBranchRequiredStatusChecksContextsEndpoint, ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions]; + "PUT /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint, ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint, ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint, ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint, ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions]; + "PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint, ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint, ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposGetProtectedBranchRequiredSignaturesEndpoint, ReposGetProtectedBranchRequiredSignaturesRequestOptions]; + "POST /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposAddProtectedBranchRequiredSignaturesEndpoint, ReposAddProtectedBranchRequiredSignaturesRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposRemoveProtectedBranchRequiredSignaturesEndpoint, ReposRemoveProtectedBranchRequiredSignaturesRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposGetProtectedBranchAdminEnforcementEndpoint, ReposGetProtectedBranchAdminEnforcementRequestOptions]; + "POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposAddProtectedBranchAdminEnforcementEndpoint, ReposAddProtectedBranchAdminEnforcementRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposRemoveProtectedBranchAdminEnforcementEndpoint, ReposRemoveProtectedBranchAdminEnforcementRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions": [ReposGetProtectedBranchRestrictionsEndpoint, ReposGetProtectedBranchRestrictionsRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions": [ReposRemoveProtectedBranchRestrictionsEndpoint, ReposRemoveProtectedBranchRestrictionsRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposListProtectedBranchTeamRestrictionsEndpoint, ReposListProtectedBranchTeamRestrictionsRequestOptions]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposReplaceProtectedBranchTeamRestrictionsEndpoint, ReposReplaceProtectedBranchTeamRestrictionsRequestOptions]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposAddProtectedBranchTeamRestrictionsEndpoint, ReposAddProtectedBranchTeamRestrictionsRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposRemoveProtectedBranchTeamRestrictionsEndpoint, ReposRemoveProtectedBranchTeamRestrictionsRequestOptions]; + "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposListProtectedBranchUserRestrictionsEndpoint, ReposListProtectedBranchUserRestrictionsRequestOptions]; + "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposReplaceProtectedBranchUserRestrictionsEndpoint, ReposReplaceProtectedBranchUserRestrictionsRequestOptions]; + "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposAddProtectedBranchUserRestrictionsEndpoint, ReposAddProtectedBranchUserRestrictionsRequestOptions]; + "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposRemoveProtectedBranchUserRestrictionsEndpoint, ReposRemoveProtectedBranchUserRestrictionsRequestOptions]; + "GET /repos/:owner/:repo/collaborators": [ReposListCollaboratorsEndpoint, ReposListCollaboratorsRequestOptions]; + "GET /repos/:owner/:repo/collaborators/:username": [ReposCheckCollaboratorEndpoint, ReposCheckCollaboratorRequestOptions]; + "GET /repos/:owner/:repo/collaborators/:username/permission": [ReposGetCollaboratorPermissionLevelEndpoint, ReposGetCollaboratorPermissionLevelRequestOptions]; + "PUT /repos/:owner/:repo/collaborators/:username": [ReposAddCollaboratorEndpoint, ReposAddCollaboratorRequestOptions]; + "DELETE /repos/:owner/:repo/collaborators/:username": [ReposRemoveCollaboratorEndpoint, ReposRemoveCollaboratorRequestOptions]; + "GET /repos/:owner/:repo/comments": [ReposListCommitCommentsEndpoint, ReposListCommitCommentsRequestOptions]; + "GET /repos/:owner/:repo/commits/:commit_sha/comments": [ReposListCommentsForCommitEndpoint, ReposListCommentsForCommitRequestOptions]; + "POST /repos/:owner/:repo/commits/:commit_sha/comments": [ReposCreateCommitCommentEndpoint, ReposCreateCommitCommentRequestOptions]; + "GET /repos/:owner/:repo/comments/:comment_id": [ReposGetCommitCommentEndpoint, ReposGetCommitCommentRequestOptions]; + "PATCH /repos/:owner/:repo/comments/:comment_id": [ReposUpdateCommitCommentEndpoint, ReposUpdateCommitCommentRequestOptions]; + "DELETE /repos/:owner/:repo/comments/:comment_id": [ReposDeleteCommitCommentEndpoint, ReposDeleteCommitCommentRequestOptions]; + "GET /repos/:owner/:repo/commits": [ReposListCommitsEndpoint, ReposListCommitsRequestOptions]; + "GET /repos/:owner/:repo/commits/:ref": [ReposGetCommitEndpoint | ReposGetCommitRefShaEndpoint, ReposGetCommitRequestOptions | ReposGetCommitRefShaRequestOptions]; + "GET /repos/:owner/:repo/compare/:base...:head": [ReposCompareCommitsEndpoint, ReposCompareCommitsRequestOptions]; + "GET /repos/:owner/:repo/commits/:commit_sha/branches-where-head": [ReposListBranchesForHeadCommitEndpoint, ReposListBranchesForHeadCommitRequestOptions]; + "GET /repos/:owner/:repo/commits/:commit_sha/pulls": [ReposListPullRequestsAssociatedWithCommitEndpoint, ReposListPullRequestsAssociatedWithCommitRequestOptions]; + "GET /repos/:owner/:repo/community/profile": [ReposRetrieveCommunityProfileMetricsEndpoint, ReposRetrieveCommunityProfileMetricsRequestOptions]; + "GET /repos/:owner/:repo/readme": [ReposGetReadmeEndpoint, ReposGetReadmeRequestOptions]; + "GET /repos/:owner/:repo/contents/:path": [ReposGetContentsEndpoint, ReposGetContentsRequestOptions]; + "PUT /repos/:owner/:repo/contents/:path": [ReposCreateOrUpdateFileEndpoint | ReposCreateFileEndpoint | ReposUpdateFileEndpoint, ReposCreateOrUpdateFileRequestOptions | ReposCreateFileRequestOptions | ReposUpdateFileRequestOptions]; + "DELETE /repos/:owner/:repo/contents/:path": [ReposDeleteFileEndpoint, ReposDeleteFileRequestOptions]; + "GET /repos/:owner/:repo/:archive_format/:ref": [ReposGetArchiveLinkEndpoint, ReposGetArchiveLinkRequestOptions]; + "GET /repos/:owner/:repo/deployments": [ReposListDeploymentsEndpoint, ReposListDeploymentsRequestOptions]; + "GET /repos/:owner/:repo/deployments/:deployment_id": [ReposGetDeploymentEndpoint, ReposGetDeploymentRequestOptions]; + "POST /repos/:owner/:repo/deployments": [ReposCreateDeploymentEndpoint, ReposCreateDeploymentRequestOptions]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses": [ReposListDeploymentStatusesEndpoint, ReposListDeploymentStatusesRequestOptions]; + "GET /repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id": [ReposGetDeploymentStatusEndpoint, ReposGetDeploymentStatusRequestOptions]; + "POST /repos/:owner/:repo/deployments/:deployment_id/statuses": [ReposCreateDeploymentStatusEndpoint, ReposCreateDeploymentStatusRequestOptions]; + "GET /repos/:owner/:repo/downloads": [ReposListDownloadsEndpoint, ReposListDownloadsRequestOptions]; + "GET /repos/:owner/:repo/downloads/:download_id": [ReposGetDownloadEndpoint, ReposGetDownloadRequestOptions]; + "DELETE /repos/:owner/:repo/downloads/:download_id": [ReposDeleteDownloadEndpoint, ReposDeleteDownloadRequestOptions]; + "GET /repos/:owner/:repo/forks": [ReposListForksEndpoint, ReposListForksRequestOptions]; + "POST /repos/:owner/:repo/forks": [ReposCreateForkEndpoint, ReposCreateForkRequestOptions]; + "GET /repos/:owner/:repo/hooks": [ReposListHooksEndpoint, ReposListHooksRequestOptions]; + "GET /repos/:owner/:repo/hooks/:hook_id": [ReposGetHookEndpoint, ReposGetHookRequestOptions]; + "POST /repos/:owner/:repo/hooks": [ReposCreateHookEndpoint, ReposCreateHookRequestOptions]; + "PATCH /repos/:owner/:repo/hooks/:hook_id": [ReposUpdateHookEndpoint, ReposUpdateHookRequestOptions]; + "POST /repos/:owner/:repo/hooks/:hook_id/tests": [ReposTestPushHookEndpoint, ReposTestPushHookRequestOptions]; + "POST /repos/:owner/:repo/hooks/:hook_id/pings": [ReposPingHookEndpoint, ReposPingHookRequestOptions]; + "DELETE /repos/:owner/:repo/hooks/:hook_id": [ReposDeleteHookEndpoint, ReposDeleteHookRequestOptions]; + "GET /repos/:owner/:repo/invitations": [ReposListInvitationsEndpoint, ReposListInvitationsRequestOptions]; + "DELETE /repos/:owner/:repo/invitations/:invitation_id": [ReposDeleteInvitationEndpoint, ReposDeleteInvitationRequestOptions]; + "PATCH /repos/:owner/:repo/invitations/:invitation_id": [ReposUpdateInvitationEndpoint, ReposUpdateInvitationRequestOptions]; + "GET /user/repository_invitations": [ReposListInvitationsForAuthenticatedUserEndpoint, ReposListInvitationsForAuthenticatedUserRequestOptions]; + "PATCH /user/repository_invitations/:invitation_id": [ReposAcceptInvitationEndpoint, ReposAcceptInvitationRequestOptions]; + "DELETE /user/repository_invitations/:invitation_id": [ReposDeclineInvitationEndpoint, ReposDeclineInvitationRequestOptions]; + "GET /repos/:owner/:repo/keys": [ReposListDeployKeysEndpoint, ReposListDeployKeysRequestOptions]; + "GET /repos/:owner/:repo/keys/:key_id": [ReposGetDeployKeyEndpoint, ReposGetDeployKeyRequestOptions]; + "POST /repos/:owner/:repo/keys": [ReposAddDeployKeyEndpoint, ReposAddDeployKeyRequestOptions]; + "DELETE /repos/:owner/:repo/keys/:key_id": [ReposRemoveDeployKeyEndpoint, ReposRemoveDeployKeyRequestOptions]; + "POST /repos/:owner/:repo/merges": [ReposMergeEndpoint, ReposMergeRequestOptions]; + "GET /repos/:owner/:repo/pages": [ReposGetPagesEndpoint, ReposGetPagesRequestOptions]; + "POST /repos/:owner/:repo/pages": [ReposEnablePagesSiteEndpoint, ReposEnablePagesSiteRequestOptions]; + "DELETE /repos/:owner/:repo/pages": [ReposDisablePagesSiteEndpoint, ReposDisablePagesSiteRequestOptions]; + "PUT /repos/:owner/:repo/pages": [ReposUpdateInformationAboutPagesSiteEndpoint, ReposUpdateInformationAboutPagesSiteRequestOptions]; + "POST /repos/:owner/:repo/pages/builds": [ReposRequestPageBuildEndpoint, ReposRequestPageBuildRequestOptions]; + "GET /repos/:owner/:repo/pages/builds": [ReposListPagesBuildsEndpoint, ReposListPagesBuildsRequestOptions]; + "GET /repos/:owner/:repo/pages/builds/latest": [ReposGetLatestPagesBuildEndpoint, ReposGetLatestPagesBuildRequestOptions]; + "GET /repos/:owner/:repo/pages/builds/:build_id": [ReposGetPagesBuildEndpoint, ReposGetPagesBuildRequestOptions]; + "GET /repos/:owner/:repo/releases": [ReposListReleasesEndpoint, ReposListReleasesRequestOptions]; + "GET /repos/:owner/:repo/releases/:release_id": [ReposGetReleaseEndpoint, ReposGetReleaseRequestOptions]; + "GET /repos/:owner/:repo/releases/latest": [ReposGetLatestReleaseEndpoint, ReposGetLatestReleaseRequestOptions]; + "GET /repos/:owner/:repo/releases/tags/:tag": [ReposGetReleaseByTagEndpoint, ReposGetReleaseByTagRequestOptions]; + "POST /repos/:owner/:repo/releases": [ReposCreateReleaseEndpoint, ReposCreateReleaseRequestOptions]; + "PATCH /repos/:owner/:repo/releases/:release_id": [ReposUpdateReleaseEndpoint, ReposUpdateReleaseRequestOptions]; + "DELETE /repos/:owner/:repo/releases/:release_id": [ReposDeleteReleaseEndpoint, ReposDeleteReleaseRequestOptions]; + "GET /repos/:owner/:repo/releases/:release_id/assets": [ReposListAssetsForReleaseEndpoint, ReposListAssetsForReleaseRequestOptions]; + "POST :url": [ReposUploadReleaseAssetEndpoint, ReposUploadReleaseAssetRequestOptions]; + "GET /repos/:owner/:repo/releases/assets/:asset_id": [ReposGetReleaseAssetEndpoint, ReposGetReleaseAssetRequestOptions]; + "PATCH /repos/:owner/:repo/releases/assets/:asset_id": [ReposUpdateReleaseAssetEndpoint, ReposUpdateReleaseAssetRequestOptions]; + "DELETE /repos/:owner/:repo/releases/assets/:asset_id": [ReposDeleteReleaseAssetEndpoint, ReposDeleteReleaseAssetRequestOptions]; + "GET /repos/:owner/:repo/stats/contributors": [ReposGetContributorsStatsEndpoint, ReposGetContributorsStatsRequestOptions]; + "GET /repos/:owner/:repo/stats/commit_activity": [ReposGetCommitActivityStatsEndpoint, ReposGetCommitActivityStatsRequestOptions]; + "GET /repos/:owner/:repo/stats/code_frequency": [ReposGetCodeFrequencyStatsEndpoint, ReposGetCodeFrequencyStatsRequestOptions]; + "GET /repos/:owner/:repo/stats/participation": [ReposGetParticipationStatsEndpoint, ReposGetParticipationStatsRequestOptions]; + "GET /repos/:owner/:repo/stats/punch_card": [ReposGetPunchCardStatsEndpoint, ReposGetPunchCardStatsRequestOptions]; + "POST /repos/:owner/:repo/statuses/:sha": [ReposCreateStatusEndpoint, ReposCreateStatusRequestOptions]; + "GET /repos/:owner/:repo/commits/:ref/statuses": [ReposListStatusesForRefEndpoint, ReposListStatusesForRefRequestOptions]; + "GET /repos/:owner/:repo/commits/:ref/status": [ReposGetCombinedStatusForRefEndpoint, ReposGetCombinedStatusForRefRequestOptions]; + "GET /repos/:owner/:repo/traffic/popular/referrers": [ReposGetTopReferrersEndpoint, ReposGetTopReferrersRequestOptions]; + "GET /repos/:owner/:repo/traffic/popular/paths": [ReposGetTopPathsEndpoint, ReposGetTopPathsRequestOptions]; + "GET /repos/:owner/:repo/traffic/views": [ReposGetViewsEndpoint, ReposGetViewsRequestOptions]; + "GET /repos/:owner/:repo/traffic/clones": [ReposGetClonesEndpoint, ReposGetClonesRequestOptions]; + "GET /scim/v2/organizations/:org/Users": [ScimListProvisionedIdentitiesEndpoint, ScimListProvisionedIdentitiesRequestOptions]; + "GET /scim/v2/organizations/:org/Users/:scim_user_id": [ScimGetProvisioningDetailsForUserEndpoint, ScimGetProvisioningDetailsForUserRequestOptions]; + "POST /scim/v2/organizations/:org/Users": [ScimProvisionAndInviteUsersEndpoint | ScimProvisionInviteUsersEndpoint, ScimProvisionAndInviteUsersRequestOptions | ScimProvisionInviteUsersRequestOptions]; + "PUT /scim/v2/organizations/:org/Users/:scim_user_id": [ScimReplaceProvisionedUserInformationEndpoint | ScimUpdateProvisionedOrgMembershipEndpoint, ScimReplaceProvisionedUserInformationRequestOptions | ScimUpdateProvisionedOrgMembershipRequestOptions]; + "PATCH /scim/v2/organizations/:org/Users/:scim_user_id": [ScimUpdateUserAttributeEndpoint, ScimUpdateUserAttributeRequestOptions]; + "DELETE /scim/v2/organizations/:org/Users/:scim_user_id": [ScimRemoveUserFromOrgEndpoint, ScimRemoveUserFromOrgRequestOptions]; + "GET /search/repositories": [SearchReposEndpoint, SearchReposRequestOptions]; + "GET /search/commits": [SearchCommitsEndpoint, SearchCommitsRequestOptions]; + "GET /search/code": [SearchCodeEndpoint, SearchCodeRequestOptions]; + "GET /search/issues": [SearchIssuesAndPullRequestsEndpoint | SearchIssuesEndpoint, SearchIssuesAndPullRequestsRequestOptions | SearchIssuesRequestOptions]; + "GET /search/users": [SearchUsersEndpoint, SearchUsersRequestOptions]; + "GET /search/topics": [SearchTopicsEndpoint, SearchTopicsRequestOptions]; + "GET /search/labels": [SearchLabelsEndpoint, SearchLabelsRequestOptions]; + "GET /legacy/issues/search/:owner/:repository/:state/:keyword": [SearchIssuesLegacyEndpoint, SearchIssuesLegacyRequestOptions]; + "GET /legacy/repos/search/:keyword": [SearchReposLegacyEndpoint, SearchReposLegacyRequestOptions]; + "GET /legacy/user/search/:keyword": [SearchUsersLegacyEndpoint, SearchUsersLegacyRequestOptions]; + "GET /legacy/user/email/:email": [SearchEmailLegacyEndpoint, SearchEmailLegacyRequestOptions]; + "GET /orgs/:org/teams": [TeamsListEndpoint, TeamsListRequestOptions]; + "GET /teams/:team_id": [TeamsGetEndpoint, TeamsGetRequestOptions]; + "GET /orgs/:org/teams/:team_slug": [TeamsGetByNameEndpoint, TeamsGetByNameRequestOptions]; + "POST /orgs/:org/teams": [TeamsCreateEndpoint, TeamsCreateRequestOptions]; + "PATCH /teams/:team_id": [TeamsUpdateEndpoint, TeamsUpdateRequestOptions]; + "DELETE /teams/:team_id": [TeamsDeleteEndpoint, TeamsDeleteRequestOptions]; + "GET /teams/:team_id/teams": [TeamsListChildEndpoint, TeamsListChildRequestOptions]; + "GET /teams/:team_id/repos": [TeamsListReposEndpoint, TeamsListReposRequestOptions]; + "GET /teams/:team_id/repos/:owner/:repo": [TeamsCheckManagesRepoEndpoint, TeamsCheckManagesRepoRequestOptions]; + "PUT /teams/:team_id/repos/:owner/:repo": [TeamsAddOrUpdateRepoEndpoint, TeamsAddOrUpdateRepoRequestOptions]; + "DELETE /teams/:team_id/repos/:owner/:repo": [TeamsRemoveRepoEndpoint, TeamsRemoveRepoRequestOptions]; + "GET /user/teams": [TeamsListForAuthenticatedUserEndpoint, TeamsListForAuthenticatedUserRequestOptions]; + "GET /teams/:team_id/projects": [TeamsListProjectsEndpoint, TeamsListProjectsRequestOptions]; + "GET /teams/:team_id/projects/:project_id": [TeamsReviewProjectEndpoint, TeamsReviewProjectRequestOptions]; + "PUT /teams/:team_id/projects/:project_id": [TeamsAddOrUpdateProjectEndpoint, TeamsAddOrUpdateProjectRequestOptions]; + "DELETE /teams/:team_id/projects/:project_id": [TeamsRemoveProjectEndpoint, TeamsRemoveProjectRequestOptions]; + "GET /teams/:team_id/discussions/:discussion_number/comments": [TeamsListDiscussionCommentsEndpoint, TeamsListDiscussionCommentsRequestOptions]; + "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsGetDiscussionCommentEndpoint, TeamsGetDiscussionCommentRequestOptions]; + "POST /teams/:team_id/discussions/:discussion_number/comments": [TeamsCreateDiscussionCommentEndpoint, TeamsCreateDiscussionCommentRequestOptions]; + "PATCH /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsUpdateDiscussionCommentEndpoint, TeamsUpdateDiscussionCommentRequestOptions]; + "DELETE /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsDeleteDiscussionCommentEndpoint, TeamsDeleteDiscussionCommentRequestOptions]; + "GET /teams/:team_id/discussions": [TeamsListDiscussionsEndpoint, TeamsListDiscussionsRequestOptions]; + "GET /teams/:team_id/discussions/:discussion_number": [TeamsGetDiscussionEndpoint, TeamsGetDiscussionRequestOptions]; + "POST /teams/:team_id/discussions": [TeamsCreateDiscussionEndpoint, TeamsCreateDiscussionRequestOptions]; + "PATCH /teams/:team_id/discussions/:discussion_number": [TeamsUpdateDiscussionEndpoint, TeamsUpdateDiscussionRequestOptions]; + "DELETE /teams/:team_id/discussions/:discussion_number": [TeamsDeleteDiscussionEndpoint, TeamsDeleteDiscussionRequestOptions]; + "GET /teams/:team_id/members": [TeamsListMembersEndpoint, TeamsListMembersRequestOptions]; + "GET /teams/:team_id/members/:username": [TeamsGetMemberEndpoint, TeamsGetMemberRequestOptions]; + "PUT /teams/:team_id/members/:username": [TeamsAddMemberEndpoint, TeamsAddMemberRequestOptions]; + "DELETE /teams/:team_id/members/:username": [TeamsRemoveMemberEndpoint, TeamsRemoveMemberRequestOptions]; + "GET /teams/:team_id/memberships/:username": [TeamsGetMembershipEndpoint, TeamsGetMembershipRequestOptions]; + "PUT /teams/:team_id/memberships/:username": [TeamsAddOrUpdateMembershipEndpoint, TeamsAddOrUpdateMembershipRequestOptions]; + "DELETE /teams/:team_id/memberships/:username": [TeamsRemoveMembershipEndpoint, TeamsRemoveMembershipRequestOptions]; + "GET /teams/:team_id/invitations": [TeamsListPendingInvitationsEndpoint, TeamsListPendingInvitationsRequestOptions]; + "GET /orgs/:org/team-sync/groups": [TeamsListIdPGroupsForOrgEndpoint, TeamsListIdPGroupsForOrgRequestOptions]; + "GET /teams/:team_id/team-sync/group-mappings": [TeamsListIdPGroupsEndpoint, TeamsListIdPGroupsRequestOptions]; + "PATCH /teams/:team_id/team-sync/group-mappings": [TeamsCreateOrUpdateIdPGroupConnectionsEndpoint, TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions]; + "GET /users/:username": [UsersGetByUsernameEndpoint, UsersGetByUsernameRequestOptions]; + "GET /user": [UsersGetAuthenticatedEndpoint, UsersGetAuthenticatedRequestOptions]; + "PATCH /user": [UsersUpdateAuthenticatedEndpoint, UsersUpdateAuthenticatedRequestOptions]; + "GET /users/:username/hovercard": [UsersGetContextForUserEndpoint, UsersGetContextForUserRequestOptions]; + "GET /users": [UsersListEndpoint, UsersListRequestOptions]; + "GET /user/blocks": [UsersListBlockedEndpoint, UsersListBlockedRequestOptions]; + "GET /user/blocks/:username": [UsersCheckBlockedEndpoint, UsersCheckBlockedRequestOptions]; + "PUT /user/blocks/:username": [UsersBlockEndpoint, UsersBlockRequestOptions]; + "DELETE /user/blocks/:username": [UsersUnblockEndpoint, UsersUnblockRequestOptions]; + "GET /user/emails": [UsersListEmailsEndpoint, UsersListEmailsRequestOptions]; + "GET /user/public_emails": [UsersListPublicEmailsEndpoint, UsersListPublicEmailsRequestOptions]; + "POST /user/emails": [UsersAddEmailsEndpoint, UsersAddEmailsRequestOptions]; + "DELETE /user/emails": [UsersDeleteEmailsEndpoint, UsersDeleteEmailsRequestOptions]; + "PATCH /user/email/visibility": [UsersTogglePrimaryEmailVisibilityEndpoint, UsersTogglePrimaryEmailVisibilityRequestOptions]; + "GET /users/:username/followers": [UsersListFollowersForUserEndpoint, UsersListFollowersForUserRequestOptions]; + "GET /user/followers": [UsersListFollowersForAuthenticatedUserEndpoint, UsersListFollowersForAuthenticatedUserRequestOptions]; + "GET /users/:username/following": [UsersListFollowingForUserEndpoint, UsersListFollowingForUserRequestOptions]; + "GET /user/following": [UsersListFollowingForAuthenticatedUserEndpoint, UsersListFollowingForAuthenticatedUserRequestOptions]; + "GET /user/following/:username": [UsersCheckFollowingEndpoint, UsersCheckFollowingRequestOptions]; + "GET /users/:username/following/:target_user": [UsersCheckFollowingForUserEndpoint, UsersCheckFollowingForUserRequestOptions]; + "PUT /user/following/:username": [UsersFollowEndpoint, UsersFollowRequestOptions]; + "DELETE /user/following/:username": [UsersUnfollowEndpoint, UsersUnfollowRequestOptions]; + "GET /users/:username/gpg_keys": [UsersListGpgKeysForUserEndpoint, UsersListGpgKeysForUserRequestOptions]; + "GET /user/gpg_keys": [UsersListGpgKeysEndpoint, UsersListGpgKeysRequestOptions]; + "GET /user/gpg_keys/:gpg_key_id": [UsersGetGpgKeyEndpoint, UsersGetGpgKeyRequestOptions]; + "POST /user/gpg_keys": [UsersCreateGpgKeyEndpoint, UsersCreateGpgKeyRequestOptions]; + "DELETE /user/gpg_keys/:gpg_key_id": [UsersDeleteGpgKeyEndpoint, UsersDeleteGpgKeyRequestOptions]; + "GET /users/:username/keys": [UsersListPublicKeysForUserEndpoint, UsersListPublicKeysForUserRequestOptions]; + "GET /user/keys": [UsersListPublicKeysEndpoint, UsersListPublicKeysRequestOptions]; + "GET /user/keys/:key_id": [UsersGetPublicKeyEndpoint, UsersGetPublicKeyRequestOptions]; + "POST /user/keys": [UsersCreatePublicKeyEndpoint, UsersCreatePublicKeyRequestOptions]; + "DELETE /user/keys/:key_id": [UsersDeletePublicKeyEndpoint, UsersDeletePublicKeyRequestOptions]; +} +declare type ActivityListPublicEventsEndpoint = { + per_page?: number; + page?: number; +}; +declare type ActivityListPublicEventsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListRepoEventsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ActivityListRepoEventsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListPublicEventsForRepoNetworkEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ActivityListPublicEventsForRepoNetworkRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListPublicEventsForOrgEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type ActivityListPublicEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListReceivedEventsForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type ActivityListReceivedEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListReceivedPublicEventsForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type ActivityListReceivedPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListEventsForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type ActivityListEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListPublicEventsForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type ActivityListPublicEventsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListEventsForOrgEndpoint = { + username: string; + org: string; + per_page?: number; + page?: number; +}; +declare type ActivityListEventsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListFeedsEndpoint = {}; +declare type ActivityListFeedsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListNotificationsEndpoint = { + all?: boolean; + participating?: boolean; + since?: string; + before?: string; + per_page?: number; + page?: number; +}; +declare type ActivityListNotificationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListNotificationsForRepoEndpoint = { + owner: string; + repo: string; + all?: boolean; + participating?: boolean; + since?: string; + before?: string; + per_page?: number; + page?: number; +}; +declare type ActivityListNotificationsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityMarkAsReadEndpoint = { + last_read_at?: string; +}; +declare type ActivityMarkAsReadRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityMarkNotificationsAsReadForRepoEndpoint = { + owner: string; + repo: string; + last_read_at?: string; +}; +declare type ActivityMarkNotificationsAsReadForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityGetThreadEndpoint = { + thread_id: number; +}; +declare type ActivityGetThreadRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityMarkThreadAsReadEndpoint = { + thread_id: number; +}; +declare type ActivityMarkThreadAsReadRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityGetThreadSubscriptionEndpoint = { + thread_id: number; +}; +declare type ActivityGetThreadSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivitySetThreadSubscriptionEndpoint = { + thread_id: number; + ignored?: boolean; +}; +declare type ActivitySetThreadSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityDeleteThreadSubscriptionEndpoint = { + thread_id: number; +}; +declare type ActivityDeleteThreadSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListStargazersForRepoEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ActivityListStargazersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListReposStarredByUserEndpoint = { + username: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type ActivityListReposStarredByUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListReposStarredByAuthenticatedUserEndpoint = { + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type ActivityListReposStarredByAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityCheckStarringRepoEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityCheckStarringRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityStarRepoEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityStarRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityUnstarRepoEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityUnstarRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListWatchersForRepoEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ActivityListWatchersForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListReposWatchedByUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type ActivityListReposWatchedByUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityListWatchedReposForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type ActivityListWatchedReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityGetRepoSubscriptionEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityGetRepoSubscriptionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivitySetRepoSubscriptionEndpoint = { + owner: string; + repo: string; + subscribed?: boolean; + ignored?: boolean; +}; +declare type ActivitySetRepoSubscriptionRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityDeleteRepoSubscriptionEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityDeleteRepoSubscriptionRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityCheckWatchingRepoLegacyEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityCheckWatchingRepoLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityWatchRepoLegacyEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityWatchRepoLegacyRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ActivityStopWatchingRepoLegacyEndpoint = { + owner: string; + repo: string; +}; +declare type ActivityStopWatchingRepoLegacyRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetBySlugEndpoint = { + app_slug: string; +}; +declare type AppsGetBySlugRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetAuthenticatedEndpoint = {}; +declare type AppsGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListInstallationsEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListInstallationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetInstallationEndpoint = { + installation_id: number; +}; +declare type AppsGetInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsDeleteInstallationEndpoint = { + installation_id: number; +}; +declare type AppsDeleteInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsCreateInstallationTokenEndpoint = { + installation_id: number; + repository_ids?: number[]; + permissions?: object; +}; +declare type AppsCreateInstallationTokenRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetOrgInstallationEndpoint = { + org: string; +}; +declare type AppsGetOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsFindOrgInstallationEndpoint = { + org: string; +}; +declare type AppsFindOrgInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetRepoInstallationEndpoint = { + owner: string; + repo: string; +}; +declare type AppsGetRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsFindRepoInstallationEndpoint = { + owner: string; + repo: string; +}; +declare type AppsFindRepoInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsGetUserInstallationEndpoint = { + username: string; +}; +declare type AppsGetUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsFindUserInstallationEndpoint = { + username: string; +}; +declare type AppsFindUserInstallationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsCreateFromManifestEndpoint = { + code: string; +}; +declare type AppsCreateFromManifestRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListReposEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListInstallationsForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListInstallationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListInstallationReposForAuthenticatedUserEndpoint = { + installation_id: number; + per_page?: number; + page?: number; +}; +declare type AppsListInstallationReposForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsAddRepoToInstallationEndpoint = { + installation_id: number; + repository_id: number; +}; +declare type AppsAddRepoToInstallationRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsRemoveRepoFromInstallationEndpoint = { + installation_id: number; + repository_id: number; +}; +declare type AppsRemoveRepoFromInstallationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsCreateContentAttachmentEndpoint = { + content_reference_id: number; + title: string; + body: string; +}; +declare type AppsCreateContentAttachmentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListPlansEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListPlansRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListPlansStubbedEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListPlansStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListAccountsUserOrOrgOnPlanEndpoint = { + plan_id: number; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type AppsListAccountsUserOrOrgOnPlanRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListAccountsUserOrOrgOnPlanStubbedEndpoint = { + plan_id: number; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsCheckAccountIsAssociatedWithAnyEndpoint = { + account_id: number; + per_page?: number; + page?: number; +}; +declare type AppsCheckAccountIsAssociatedWithAnyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint = { + account_id: number; + per_page?: number; + page?: number; +}; +declare type AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListMarketplacePurchasesForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint = { + per_page?: number; + page?: number; +}; +declare type AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksCreateEndpoint = { + owner: string; + repo: string; + name: string; + head_sha: string; + details_url?: string; + external_id?: string; + status?: string; + started_at?: string; + conclusion?: string; + completed_at?: string; + output?: object; + "output.title": string; + "output.summary": string; + "output.text"?: string; + "output.annotations"?: object[]; + "output.annotations[].path": string; + "output.annotations[].start_line": number; + "output.annotations[].end_line": number; + "output.annotations[].start_column"?: number; + "output.annotations[].end_column"?: number; + "output.annotations[].annotation_level": string; + "output.annotations[].message": string; + "output.annotations[].title"?: string; + "output.annotations[].raw_details"?: string; + "output.images"?: object[]; + "output.images[].alt": string; + "output.images[].image_url": string; + "output.images[].caption"?: string; + actions?: object[]; + "actions[].label": string; + "actions[].description": string; + "actions[].identifier": string; +}; +declare type ChecksCreateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksUpdateEndpoint = { + owner: string; + repo: string; + check_run_id: number; + name?: string; + details_url?: string; + external_id?: string; + started_at?: string; + status?: string; + conclusion?: string; + completed_at?: string; + output?: object; + "output.title"?: string; + "output.summary": string; + "output.text"?: string; + "output.annotations"?: object[]; + "output.annotations[].path": string; + "output.annotations[].start_line": number; + "output.annotations[].end_line": number; + "output.annotations[].start_column"?: number; + "output.annotations[].end_column"?: number; + "output.annotations[].annotation_level": string; + "output.annotations[].message": string; + "output.annotations[].title"?: string; + "output.annotations[].raw_details"?: string; + "output.images"?: object[]; + "output.images[].alt": string; + "output.images[].image_url": string; + "output.images[].caption"?: string; + actions?: object[]; + "actions[].label": string; + "actions[].description": string; + "actions[].identifier": string; +}; +declare type ChecksUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksListForRefEndpoint = { + owner: string; + repo: string; + ref: string; + check_name?: string; + status?: string; + filter?: string; + per_page?: number; + page?: number; +}; +declare type ChecksListForRefRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksListForSuiteEndpoint = { + owner: string; + repo: string; + check_suite_id: number; + check_name?: string; + status?: string; + filter?: string; + per_page?: number; + page?: number; +}; +declare type ChecksListForSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksGetEndpoint = { + owner: string; + repo: string; + check_run_id: number; +}; +declare type ChecksGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksListAnnotationsEndpoint = { + owner: string; + repo: string; + check_run_id: number; + per_page?: number; + page?: number; +}; +declare type ChecksListAnnotationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksGetSuiteEndpoint = { + owner: string; + repo: string; + check_suite_id: number; +}; +declare type ChecksGetSuiteRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksListSuitesForRefEndpoint = { + owner: string; + repo: string; + ref: string; + app_id?: number; + check_name?: string; + per_page?: number; + page?: number; +}; +declare type ChecksListSuitesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksSetSuitesPreferencesEndpoint = { + owner: string; + repo: string; + auto_trigger_checks?: object[]; + "auto_trigger_checks[].app_id": number; + "auto_trigger_checks[].setting": boolean; +}; +declare type ChecksSetSuitesPreferencesRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksCreateSuiteEndpoint = { + owner: string; + repo: string; + head_sha: string; +}; +declare type ChecksCreateSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ChecksRerequestSuiteEndpoint = { + owner: string; + repo: string; + check_suite_id: number; +}; +declare type ChecksRerequestSuiteRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type CodesOfConductListConductCodesEndpoint = {}; +declare type CodesOfConductListConductCodesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type CodesOfConductGetConductCodeEndpoint = { + key: string; +}; +declare type CodesOfConductGetConductCodeRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type CodesOfConductGetForRepoEndpoint = { + owner: string; + repo: string; +}; +declare type CodesOfConductGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type EmojisGetEndpoint = {}; +declare type EmojisGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListPublicForUserEndpoint = { + username: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type GistsListPublicForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type GistsListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListPublicEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type GistsListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListStarredEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type GistsListStarredRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsGetEndpoint = { + gist_id: string; +}; +declare type GistsGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsGetRevisionEndpoint = { + gist_id: string; + sha: string; +}; +declare type GistsGetRevisionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsCreateEndpoint = { + files: object; + "files.content"?: string; + description?: string; + public?: boolean; +}; +declare type GistsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsUpdateEndpoint = { + gist_id: string; + description?: string; + files?: object; + "files.content"?: string; + "files.filename"?: string; +}; +declare type GistsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListCommitsEndpoint = { + gist_id: string; + per_page?: number; + page?: number; +}; +declare type GistsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsStarEndpoint = { + gist_id: string; +}; +declare type GistsStarRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsUnstarEndpoint = { + gist_id: string; +}; +declare type GistsUnstarRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsCheckIsStarredEndpoint = { + gist_id: string; +}; +declare type GistsCheckIsStarredRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsForkEndpoint = { + gist_id: string; +}; +declare type GistsForkRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListForksEndpoint = { + gist_id: string; + per_page?: number; + page?: number; +}; +declare type GistsListForksRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsDeleteEndpoint = { + gist_id: string; +}; +declare type GistsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsListCommentsEndpoint = { + gist_id: string; + per_page?: number; + page?: number; +}; +declare type GistsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsGetCommentEndpoint = { + gist_id: string; + comment_id: number; +}; +declare type GistsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsCreateCommentEndpoint = { + gist_id: string; + body: string; +}; +declare type GistsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsUpdateCommentEndpoint = { + gist_id: string; + comment_id: number; + body: string; +}; +declare type GistsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GistsDeleteCommentEndpoint = { + gist_id: string; + comment_id: number; +}; +declare type GistsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitGetBlobEndpoint = { + owner: string; + repo: string; + file_sha: string; +}; +declare type GitGetBlobRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitCreateBlobEndpoint = { + owner: string; + repo: string; + content: string; + encoding?: string; +}; +declare type GitCreateBlobRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitGetCommitEndpoint = { + owner: string; + repo: string; + commit_sha: string; +}; +declare type GitGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitCreateCommitEndpoint = { + owner: string; + repo: string; + message: string; + tree: string; + parents: string[]; + author?: object; + "author.name"?: string; + "author.email"?: string; + "author.date"?: string; + committer?: object; + "committer.name"?: string; + "committer.email"?: string; + "committer.date"?: string; + signature?: string; +}; +declare type GitCreateCommitRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitGetRefEndpoint = { + owner: string; + repo: string; + ref: string; +}; +declare type GitGetRefRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitListRefsEndpoint = { + owner: string; + repo: string; + namespace?: string; + per_page?: number; + page?: number; +}; +declare type GitListRefsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitCreateRefEndpoint = { + owner: string; + repo: string; + ref: string; + sha: string; +}; +declare type GitCreateRefRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitUpdateRefEndpoint = { + owner: string; + repo: string; + ref: string; + sha: string; + force?: boolean; +}; +declare type GitUpdateRefRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitDeleteRefEndpoint = { + owner: string; + repo: string; + ref: string; +}; +declare type GitDeleteRefRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitGetTagEndpoint = { + owner: string; + repo: string; + tag_sha: string; +}; +declare type GitGetTagRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitCreateTagEndpoint = { + owner: string; + repo: string; + tag: string; + message: string; + object: string; + type: string; + tagger?: object; + "tagger.name"?: string; + "tagger.email"?: string; + "tagger.date"?: string; +}; +declare type GitCreateTagRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitGetTreeEndpoint = { + owner: string; + repo: string; + tree_sha: string; + recursive?: number; +}; +declare type GitGetTreeRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitCreateTreeEndpoint = { + owner: string; + repo: string; + tree: object[]; + "tree[].path"?: string; + "tree[].mode"?: string; + "tree[].type"?: string; + "tree[].sha"?: string; + "tree[].content"?: string; + base_tree?: string; +}; +declare type GitCreateTreeRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitignoreListTemplatesEndpoint = {}; +declare type GitignoreListTemplatesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type GitignoreGetTemplateEndpoint = { + name: string; +}; +declare type GitignoreGetTemplateRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsGetRestrictionsForOrgEndpoint = { + org: string; +}; +declare type InteractionsGetRestrictionsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsAddOrUpdateRestrictionsForOrgEndpoint = { + org: string; + limit: string; +}; +declare type InteractionsAddOrUpdateRestrictionsForOrgRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsRemoveRestrictionsForOrgEndpoint = { + org: string; +}; +declare type InteractionsRemoveRestrictionsForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsGetRestrictionsForRepoEndpoint = { + owner: string; + repo: string; +}; +declare type InteractionsGetRestrictionsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsAddOrUpdateRestrictionsForRepoEndpoint = { + owner: string; + repo: string; + limit: string; +}; +declare type InteractionsAddOrUpdateRestrictionsForRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type InteractionsRemoveRestrictionsForRepoEndpoint = { + owner: string; + repo: string; +}; +declare type InteractionsRemoveRestrictionsForRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListEndpoint = { + filter?: string; + state?: string; + labels?: string; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type IssuesListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListForAuthenticatedUserEndpoint = { + filter?: string; + state?: string; + labels?: string; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type IssuesListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListForOrgEndpoint = { + org: string; + filter?: string; + state?: string; + labels?: string; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type IssuesListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListForRepoEndpoint = { + owner: string; + repo: string; + milestone?: string; + state?: string; + assignee?: string; + creator?: string; + mentioned?: string; + labels?: string; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type IssuesListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesGetEndpoint = { + owner: string; + repo: string; + issue_number: number; + number?: number; +}; +declare type IssuesGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesCreateEndpoint = { + owner: string; + repo: string; + title: string; + body?: string; + assignee?: string; + milestone?: number; + labels?: string[]; + assignees?: string[]; +}; +declare type IssuesCreateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesUpdateEndpoint = { + owner: string; + repo: string; + issue_number: number; + title?: string; + body?: string; + assignee?: string; + state?: string; + milestone?: number | null; + labels?: string[]; + assignees?: string[]; + number?: number; +}; +declare type IssuesUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesLockEndpoint = { + owner: string; + repo: string; + issue_number: number; + lock_reason?: string; + number?: number; +}; +declare type IssuesLockRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesUnlockEndpoint = { + owner: string; + repo: string; + issue_number: number; + number?: number; +}; +declare type IssuesUnlockRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListAssigneesEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type IssuesListAssigneesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesCheckAssigneeEndpoint = { + owner: string; + repo: string; + assignee: string; +}; +declare type IssuesCheckAssigneeRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesAddAssigneesEndpoint = { + owner: string; + repo: string; + issue_number: number; + assignees?: string[]; + number?: number; +}; +declare type IssuesAddAssigneesRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesRemoveAssigneesEndpoint = { + owner: string; + repo: string; + issue_number: number; + assignees?: string[]; + number?: number; +}; +declare type IssuesRemoveAssigneesRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListCommentsEndpoint = { + owner: string; + repo: string; + issue_number: number; + since?: string; + per_page?: number; + page?: number; + number?: number; +}; +declare type IssuesListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListCommentsForRepoEndpoint = { + owner: string; + repo: string; + sort?: string; + direction?: string; + since?: string; +}; +declare type IssuesListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesGetCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + per_page?: number; + page?: number; +}; +declare type IssuesGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesCreateCommentEndpoint = { + owner: string; + repo: string; + issue_number: number; + body: string; + number?: number; +}; +declare type IssuesCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesUpdateCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + body: string; +}; +declare type IssuesUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesDeleteCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; +}; +declare type IssuesDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListEventsEndpoint = { + owner: string; + repo: string; + issue_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type IssuesListEventsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListEventsForRepoEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type IssuesListEventsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesGetEventEndpoint = { + owner: string; + repo: string; + event_id: number; +}; +declare type IssuesGetEventRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListLabelsForRepoEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type IssuesListLabelsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesGetLabelEndpoint = { + owner: string; + repo: string; + name: string; +}; +declare type IssuesGetLabelRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesCreateLabelEndpoint = { + owner: string; + repo: string; + name: string; + color: string; + description?: string; +}; +declare type IssuesCreateLabelRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesUpdateLabelEndpoint = { + owner: string; + repo: string; + current_name: string; + name?: string; + color?: string; + description?: string; +}; +declare type IssuesUpdateLabelRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesDeleteLabelEndpoint = { + owner: string; + repo: string; + name: string; +}; +declare type IssuesDeleteLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListLabelsOnIssueEndpoint = { + owner: string; + repo: string; + issue_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type IssuesListLabelsOnIssueRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesAddLabelsEndpoint = { + owner: string; + repo: string; + issue_number: number; + labels: string[]; + number?: number; +}; +declare type IssuesAddLabelsRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesRemoveLabelEndpoint = { + owner: string; + repo: string; + issue_number: number; + name: string; + number?: number; +}; +declare type IssuesRemoveLabelRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesReplaceLabelsEndpoint = { + owner: string; + repo: string; + issue_number: number; + labels?: string[]; + number?: number; +}; +declare type IssuesReplaceLabelsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesRemoveLabelsEndpoint = { + owner: string; + repo: string; + issue_number: number; + number?: number; +}; +declare type IssuesRemoveLabelsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListLabelsForMilestoneEndpoint = { + owner: string; + repo: string; + milestone_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type IssuesListLabelsForMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListMilestonesForRepoEndpoint = { + owner: string; + repo: string; + state?: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type IssuesListMilestonesForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesGetMilestoneEndpoint = { + owner: string; + repo: string; + milestone_number: number; + number?: number; +}; +declare type IssuesGetMilestoneRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesCreateMilestoneEndpoint = { + owner: string; + repo: string; + title: string; + state?: string; + description?: string; + due_on?: string; +}; +declare type IssuesCreateMilestoneRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesUpdateMilestoneEndpoint = { + owner: string; + repo: string; + milestone_number: number; + title?: string; + state?: string; + description?: string; + due_on?: string; + number?: number; +}; +declare type IssuesUpdateMilestoneRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesDeleteMilestoneEndpoint = { + owner: string; + repo: string; + milestone_number: number; + number?: number; +}; +declare type IssuesDeleteMilestoneRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type IssuesListEventsForTimelineEndpoint = { + owner: string; + repo: string; + issue_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type IssuesListEventsForTimelineRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type LicensesListCommonlyUsedEndpoint = {}; +declare type LicensesListCommonlyUsedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type LicensesListEndpoint = {}; +declare type LicensesListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type LicensesGetEndpoint = { + license: string; +}; +declare type LicensesGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type LicensesGetForRepoEndpoint = { + owner: string; + repo: string; +}; +declare type LicensesGetForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MarkdownRenderEndpoint = { + text: string; + mode?: string; + context?: string; +}; +declare type MarkdownRenderRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MarkdownRenderRawEndpoint = { + data: string; +}; +declare type MarkdownRenderRawRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MetaGetEndpoint = {}; +declare type MetaGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsStartForOrgEndpoint = { + org: string; + repositories: string[]; + lock_repositories?: boolean; + exclude_attachments?: boolean; +}; +declare type MigrationsStartForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsListForOrgEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type MigrationsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetStatusForOrgEndpoint = { + org: string; + migration_id: number; +}; +declare type MigrationsGetStatusForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetArchiveForOrgEndpoint = { + org: string; + migration_id: number; +}; +declare type MigrationsGetArchiveForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsDeleteArchiveForOrgEndpoint = { + org: string; + migration_id: number; +}; +declare type MigrationsDeleteArchiveForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsUnlockRepoForOrgEndpoint = { + org: string; + migration_id: number; + repo_name: string; +}; +declare type MigrationsUnlockRepoForOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsStartImportEndpoint = { + owner: string; + repo: string; + vcs_url: string; + vcs?: string; + vcs_username?: string; + vcs_password?: string; + tfvc_project?: string; +}; +declare type MigrationsStartImportRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetImportProgressEndpoint = { + owner: string; + repo: string; +}; +declare type MigrationsGetImportProgressRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsUpdateImportEndpoint = { + owner: string; + repo: string; + vcs_username?: string; + vcs_password?: string; +}; +declare type MigrationsUpdateImportRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetCommitAuthorsEndpoint = { + owner: string; + repo: string; + since?: string; +}; +declare type MigrationsGetCommitAuthorsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsMapCommitAuthorEndpoint = { + owner: string; + repo: string; + author_id: number; + email?: string; + name?: string; +}; +declare type MigrationsMapCommitAuthorRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsSetLfsPreferenceEndpoint = { + owner: string; + repo: string; + use_lfs: string; +}; +declare type MigrationsSetLfsPreferenceRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetLargeFilesEndpoint = { + owner: string; + repo: string; +}; +declare type MigrationsGetLargeFilesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsCancelImportEndpoint = { + owner: string; + repo: string; +}; +declare type MigrationsCancelImportRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsStartForAuthenticatedUserEndpoint = { + repositories: string[]; + lock_repositories?: boolean; + exclude_attachments?: boolean; +}; +declare type MigrationsStartForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsListForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type MigrationsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetStatusForAuthenticatedUserEndpoint = { + migration_id: number; +}; +declare type MigrationsGetStatusForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsGetArchiveForAuthenticatedUserEndpoint = { + migration_id: number; +}; +declare type MigrationsGetArchiveForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsDeleteArchiveForAuthenticatedUserEndpoint = { + migration_id: number; +}; +declare type MigrationsDeleteArchiveForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type MigrationsUnlockRepoForAuthenticatedUserEndpoint = { + migration_id: number; + repo_name: string; +}; +declare type MigrationsUnlockRepoForAuthenticatedUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsListGrantsEndpoint = { + per_page?: number; + page?: number; +}; +declare type OauthAuthorizationsListGrantsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsGetGrantEndpoint = { + grant_id: number; +}; +declare type OauthAuthorizationsGetGrantRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsDeleteGrantEndpoint = { + grant_id: number; +}; +declare type OauthAuthorizationsDeleteGrantRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsListAuthorizationsEndpoint = { + per_page?: number; + page?: number; +}; +declare type OauthAuthorizationsListAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsGetAuthorizationEndpoint = { + authorization_id: number; +}; +declare type OauthAuthorizationsGetAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsCreateAuthorizationEndpoint = { + scopes?: string[]; + note: string; + note_url?: string; + client_id?: string; + client_secret?: string; + fingerprint?: string; +}; +declare type OauthAuthorizationsCreateAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint = { + client_id: string; + client_secret: string; + scopes?: string[]; + note?: string; + note_url?: string; + fingerprint?: string; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint = { + client_id: string; + fingerprint: string; + client_secret: string; + scopes?: string[]; + note?: string; + note_url?: string; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint = { + client_id: string; + fingerprint: string; + client_secret: string; + scopes?: string[]; + note?: string; + note_url?: string; +}; +declare type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsUpdateAuthorizationEndpoint = { + authorization_id: number; + scopes?: string[]; + add_scopes?: string[]; + remove_scopes?: string[]; + note?: string; + note_url?: string; + fingerprint?: string; +}; +declare type OauthAuthorizationsUpdateAuthorizationRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsDeleteAuthorizationEndpoint = { + authorization_id: number; +}; +declare type OauthAuthorizationsDeleteAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsCheckAuthorizationEndpoint = { + client_id: string; + access_token: string; +}; +declare type OauthAuthorizationsCheckAuthorizationRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsResetAuthorizationEndpoint = { + client_id: string; + access_token: string; +}; +declare type OauthAuthorizationsResetAuthorizationRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint = { + client_id: string; + access_token: string; +}; +declare type OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OauthAuthorizationsRevokeGrantForApplicationEndpoint = { + client_id: string; + access_token: string; +}; +declare type OauthAuthorizationsRevokeGrantForApplicationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type OrgsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type OrgsListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type OrgsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsGetEndpoint = { + org: string; +}; +declare type OrgsGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsUpdateEndpoint = { + org: string; + billing_email?: string; + company?: string; + email?: string; + location?: string; + name?: string; + description?: string; + has_organization_projects?: boolean; + has_repository_projects?: boolean; + default_repository_permission?: string; + members_can_create_repositories?: boolean; + members_allowed_repository_creation_type?: string; +}; +declare type OrgsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListCredentialAuthorizationsEndpoint = { + org: string; +}; +declare type OrgsListCredentialAuthorizationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsRemoveCredentialAuthorizationEndpoint = { + org: string; + credential_id: number; +}; +declare type OrgsRemoveCredentialAuthorizationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListBlockedUsersEndpoint = { + org: string; +}; +declare type OrgsListBlockedUsersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsCheckBlockedUserEndpoint = { + org: string; + username: string; +}; +declare type OrgsCheckBlockedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsBlockUserEndpoint = { + org: string; + username: string; +}; +declare type OrgsBlockUserRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsUnblockUserEndpoint = { + org: string; + username: string; +}; +declare type OrgsUnblockUserRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListHooksEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type OrgsListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsGetHookEndpoint = { + org: string; + hook_id: number; +}; +declare type OrgsGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsCreateHookEndpoint = { + org: string; + name: string; + config: object; + "config.url": string; + "config.content_type"?: string; + "config.secret"?: string; + "config.insecure_ssl"?: string; + events?: string[]; + active?: boolean; +}; +declare type OrgsCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsUpdateHookEndpoint = { + org: string; + hook_id: number; + config?: object; + "config.url": string; + "config.content_type"?: string; + "config.secret"?: string; + "config.insecure_ssl"?: string; + events?: string[]; + active?: boolean; +}; +declare type OrgsUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsPingHookEndpoint = { + org: string; + hook_id: number; +}; +declare type OrgsPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsDeleteHookEndpoint = { + org: string; + hook_id: number; +}; +declare type OrgsDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListMembersEndpoint = { + org: string; + filter?: string; + role?: string; + per_page?: number; + page?: number; +}; +declare type OrgsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsCheckMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsCheckMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsRemoveMemberEndpoint = { + org: string; + username: string; +}; +declare type OrgsRemoveMemberRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListPublicMembersEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type OrgsListPublicMembersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsCheckPublicMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsCheckPublicMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsPublicizeMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsPublicizeMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsConcealMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsConcealMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsGetMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsAddOrUpdateMembershipEndpoint = { + org: string; + username: string; + role?: string; +}; +declare type OrgsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsRemoveMembershipEndpoint = { + org: string; + username: string; +}; +declare type OrgsRemoveMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListInvitationTeamsEndpoint = { + org: string; + invitation_id: number; + per_page?: number; + page?: number; +}; +declare type OrgsListInvitationTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListPendingInvitationsEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type OrgsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsCreateInvitationEndpoint = { + org: string; + invitee_id?: number; + email?: string; + role?: string; + team_ids?: number[]; +}; +declare type OrgsCreateInvitationRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListMembershipsEndpoint = { + state?: string; + per_page?: number; + page?: number; +}; +declare type OrgsListMembershipsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsGetMembershipForAuthenticatedUserEndpoint = { + org: string; +}; +declare type OrgsGetMembershipForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsUpdateMembershipEndpoint = { + org: string; + state: string; +}; +declare type OrgsUpdateMembershipRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsListOutsideCollaboratorsEndpoint = { + org: string; + filter?: string; + per_page?: number; + page?: number; +}; +declare type OrgsListOutsideCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsRemoveOutsideCollaboratorEndpoint = { + org: string; + username: string; +}; +declare type OrgsRemoveOutsideCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type OrgsConvertMemberToOutsideCollaboratorEndpoint = { + org: string; + username: string; +}; +declare type OrgsConvertMemberToOutsideCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListForRepoEndpoint = { + owner: string; + repo: string; + state?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsListForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListForOrgEndpoint = { + org: string; + state?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListForUserEndpoint = { + username: string; + state?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsGetEndpoint = { + project_id: number; + per_page?: number; + page?: number; +}; +declare type ProjectsGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsCreateForRepoEndpoint = { + owner: string; + repo: string; + name: string; + body?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsCreateForRepoRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsCreateForOrgEndpoint = { + org: string; + name: string; + body?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsCreateForOrgRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsCreateForAuthenticatedUserEndpoint = { + name: string; + body?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsUpdateEndpoint = { + project_id: number; + name?: string; + body?: string; + state?: string; + organization_permission?: string; + private?: boolean; + per_page?: number; + page?: number; +}; +declare type ProjectsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsDeleteEndpoint = { + project_id: number; +}; +declare type ProjectsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListCardsEndpoint = { + column_id: number; + archived_state?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsListCardsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsGetCardEndpoint = { + card_id: number; +}; +declare type ProjectsGetCardRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsCreateCardEndpoint = { + column_id: number; + note?: string; + content_id?: number; + content_type?: string; +}; +declare type ProjectsCreateCardRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsUpdateCardEndpoint = { + card_id: number; + note?: string; + archived?: boolean; +}; +declare type ProjectsUpdateCardRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsDeleteCardEndpoint = { + card_id: number; +}; +declare type ProjectsDeleteCardRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsMoveCardEndpoint = { + card_id: number; + position: string; + column_id?: number; +}; +declare type ProjectsMoveCardRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListCollaboratorsEndpoint = { + project_id: number; + affiliation?: string; + per_page?: number; + page?: number; +}; +declare type ProjectsListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsReviewUserPermissionLevelEndpoint = { + project_id: number; + username: string; +}; +declare type ProjectsReviewUserPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsAddCollaboratorEndpoint = { + project_id: number; + username: string; + permission?: string; +}; +declare type ProjectsAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsRemoveCollaboratorEndpoint = { + project_id: number; + username: string; +}; +declare type ProjectsRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsListColumnsEndpoint = { + project_id: number; + per_page?: number; + page?: number; +}; +declare type ProjectsListColumnsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsGetColumnEndpoint = { + column_id: number; +}; +declare type ProjectsGetColumnRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsCreateColumnEndpoint = { + project_id: number; + name: string; +}; +declare type ProjectsCreateColumnRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsUpdateColumnEndpoint = { + column_id: number; + name: string; +}; +declare type ProjectsUpdateColumnRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsDeleteColumnEndpoint = { + column_id: number; +}; +declare type ProjectsDeleteColumnRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ProjectsMoveColumnEndpoint = { + column_id: number; + position: string; +}; +declare type ProjectsMoveColumnRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListEndpoint = { + owner: string; + repo: string; + state?: string; + head?: string; + base?: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type PullsListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsGetEndpoint = { + owner: string; + repo: string; + pull_number: number; + number?: number; +}; +declare type PullsGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateEndpoint = { + owner: string; + repo: string; + title: string; + head: string; + base: string; + body?: string; + maintainer_can_modify?: boolean; + draft?: boolean; +}; +declare type PullsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateFromIssueEndpoint = { + owner: string; + repo: string; + issue: number; + head: string; + base: string; + maintainer_can_modify?: boolean; + draft?: boolean; +}; +declare type PullsCreateFromIssueRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsUpdateBranchEndpoint = { + owner: string; + repo: string; + pull_number: number; + expected_head_sha?: string; +}; +declare type PullsUpdateBranchRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsUpdateEndpoint = { + owner: string; + repo: string; + pull_number: number; + title?: string; + body?: string; + state?: string; + base?: string; + maintainer_can_modify?: boolean; + number?: number; +}; +declare type PullsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListCommitsEndpoint = { + owner: string; + repo: string; + pull_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListFilesEndpoint = { + owner: string; + repo: string; + pull_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsListFilesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCheckIfMergedEndpoint = { + owner: string; + repo: string; + pull_number: number; + number?: number; +}; +declare type PullsCheckIfMergedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsMergeEndpoint = { + owner: string; + repo: string; + pull_number: number; + commit_title?: string; + commit_message?: string; + sha?: string; + merge_method?: string; + number?: number; +}; +declare type PullsMergeRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListCommentsEndpoint = { + owner: string; + repo: string; + pull_number: number; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsListCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListCommentsForRepoEndpoint = { + owner: string; + repo: string; + sort?: string; + direction?: string; + since?: string; + per_page?: number; + page?: number; +}; +declare type PullsListCommentsForRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsGetCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; +}; +declare type PullsGetCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateCommentEndpoint = { + owner: string; + repo: string; + pull_number: number; + body: string; + commit_id: string; + path: string; + position: number; + number?: number; +}; +declare type PullsCreateCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateCommentReplyEndpoint = { + owner: string; + repo: string; + pull_number: number; + body: string; + in_reply_to: number; + number?: number; +}; +declare type PullsCreateCommentReplyRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsUpdateCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + body: string; +}; +declare type PullsUpdateCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsDeleteCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; +}; +declare type PullsDeleteCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListReviewRequestsEndpoint = { + owner: string; + repo: string; + pull_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsListReviewRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateReviewRequestEndpoint = { + owner: string; + repo: string; + pull_number: number; + reviewers?: string[]; + team_reviewers?: string[]; + number?: number; +}; +declare type PullsCreateReviewRequestRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsDeleteReviewRequestEndpoint = { + owner: string; + repo: string; + pull_number: number; + reviewers?: string[]; + team_reviewers?: string[]; + number?: number; +}; +declare type PullsDeleteReviewRequestRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsListReviewsEndpoint = { + owner: string; + repo: string; + pull_number: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsListReviewsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsGetReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + number?: number; +}; +declare type PullsGetReviewRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsDeletePendingReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + number?: number; +}; +declare type PullsDeletePendingReviewRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsGetCommentsForReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + per_page?: number; + page?: number; + number?: number; +}; +declare type PullsGetCommentsForReviewRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsCreateReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + commit_id?: string; + body?: string; + event?: string; + comments?: object[]; + "comments[].path": string; + "comments[].position": number; + "comments[].body": string; + number?: number; +}; +declare type PullsCreateReviewRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsUpdateReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + body: string; + number?: number; +}; +declare type PullsUpdateReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsSubmitReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + body?: string; + event: string; + number?: number; +}; +declare type PullsSubmitReviewRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type PullsDismissReviewEndpoint = { + owner: string; + repo: string; + pull_number: number; + review_id: number; + message: string; + number?: number; +}; +declare type PullsDismissReviewRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type RateLimitGetEndpoint = {}; +declare type RateLimitGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForCommitCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content?: string; + per_page?: number; + page?: number; +}; +declare type ReactionsListForCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForCommitCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content: string; +}; +declare type ReactionsCreateForCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForIssueEndpoint = { + owner: string; + repo: string; + issue_number: number; + content?: string; + per_page?: number; + page?: number; + number?: number; +}; +declare type ReactionsListForIssueRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForIssueEndpoint = { + owner: string; + repo: string; + issue_number: number; + content: string; + number?: number; +}; +declare type ReactionsCreateForIssueRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForIssueCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content?: string; + per_page?: number; + page?: number; +}; +declare type ReactionsListForIssueCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForIssueCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content: string; +}; +declare type ReactionsCreateForIssueCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForPullRequestReviewCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content?: string; + per_page?: number; + page?: number; +}; +declare type ReactionsListForPullRequestReviewCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForPullRequestReviewCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + content: string; +}; +declare type ReactionsCreateForPullRequestReviewCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForTeamDiscussionEndpoint = { + team_id: number; + discussion_number: number; + content?: string; + per_page?: number; + page?: number; +}; +declare type ReactionsListForTeamDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForTeamDiscussionEndpoint = { + team_id: number; + discussion_number: number; + content: string; +}; +declare type ReactionsCreateForTeamDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsListForTeamDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + comment_number: number; + content?: string; + per_page?: number; + page?: number; +}; +declare type ReactionsListForTeamDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsCreateForTeamDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + comment_number: number; + content: string; +}; +declare type ReactionsCreateForTeamDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReactionsDeleteEndpoint = { + reaction_id: number; +}; +declare type ReactionsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListEndpoint = { + visibility?: string; + affiliation?: string; + type?: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type ReposListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListForUserEndpoint = { + username: string; + type?: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type ReposListForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListForOrgEndpoint = { + org: string; + type?: string; + sort?: string; + direction?: string; + per_page?: number; + page?: number; +}; +declare type ReposListForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListPublicEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type ReposListPublicRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateForAuthenticatedUserEndpoint = { + name: string; + description?: string; + homepage?: string; + private?: boolean; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + is_template?: boolean; + team_id?: number; + auto_init?: boolean; + gitignore_template?: string; + license_template?: string; + allow_squash_merge?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; +}; +declare type ReposCreateForAuthenticatedUserRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateInOrgEndpoint = { + org: string; + name: string; + description?: string; + homepage?: string; + private?: boolean; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + is_template?: boolean; + team_id?: number; + auto_init?: boolean; + gitignore_template?: string; + license_template?: string; + allow_squash_merge?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; +}; +declare type ReposCreateInOrgRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateUsingTemplateEndpoint = { + template_owner: string; + template_repo: string; + owner?: string; + name: string; + description?: string; + private?: boolean; +}; +declare type ReposCreateUsingTemplateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateEndpoint = { + owner: string; + repo: string; + name?: string; + description?: string; + homepage?: string; + private?: boolean; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + is_template?: boolean; + default_branch?: string; + allow_squash_merge?: boolean; + allow_merge_commit?: boolean; + allow_rebase_merge?: boolean; + archived?: boolean; +}; +declare type ReposUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListTopicsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposListTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposReplaceTopicsEndpoint = { + owner: string; + repo: string; + names: string[]; +}; +declare type ReposReplaceTopicsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCheckVulnerabilityAlertsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposCheckVulnerabilityAlertsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposEnableVulnerabilityAlertsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposEnableVulnerabilityAlertsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDisableVulnerabilityAlertsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposDisableVulnerabilityAlertsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposEnableAutomatedSecurityFixesEndpoint = { + owner: string; + repo: string; +}; +declare type ReposEnableAutomatedSecurityFixesRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDisableAutomatedSecurityFixesEndpoint = { + owner: string; + repo: string; +}; +declare type ReposDisableAutomatedSecurityFixesRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListContributorsEndpoint = { + owner: string; + repo: string; + anon?: string; + per_page?: number; + page?: number; +}; +declare type ReposListContributorsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListLanguagesEndpoint = { + owner: string; + repo: string; +}; +declare type ReposListLanguagesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListTeamsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListTeamsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListTagsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListTagsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteEndpoint = { + owner: string; + repo: string; +}; +declare type ReposDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposTransferEndpoint = { + owner: string; + repo: string; + new_owner?: string; + team_ids?: number[]; +}; +declare type ReposTransferRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListBranchesEndpoint = { + owner: string; + repo: string; + protected?: boolean; + per_page?: number; + page?: number; +}; +declare type ReposListBranchesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetBranchEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetBranchRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetBranchProtectionEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetBranchProtectionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateBranchProtectionEndpoint = { + owner: string; + repo: string; + branch: string; + required_status_checks: object | null; + "required_status_checks.strict": boolean; + "required_status_checks.contexts": string[]; + enforce_admins: boolean | null; + required_pull_request_reviews: object | null; + "required_pull_request_reviews.dismissal_restrictions"?: object; + "required_pull_request_reviews.dismissal_restrictions.users"?: string[]; + "required_pull_request_reviews.dismissal_restrictions.teams"?: string[]; + "required_pull_request_reviews.dismiss_stale_reviews"?: boolean; + "required_pull_request_reviews.require_code_owner_reviews"?: boolean; + "required_pull_request_reviews.required_approving_review_count"?: number; + restrictions: object | null; + "restrictions.users"?: string[]; + "restrictions.teams"?: string[]; +}; +declare type ReposUpdateBranchProtectionRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveBranchProtectionEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveBranchProtectionRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetProtectedBranchRequiredStatusChecksEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetProtectedBranchRequiredStatusChecksRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateProtectedBranchRequiredStatusChecksEndpoint = { + owner: string; + repo: string; + branch: string; + strict?: boolean; + contexts?: string[]; +}; +declare type ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchRequiredStatusChecksEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListProtectedBranchRequiredStatusChecksContextsEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint = { + owner: string; + repo: string; + branch: string; + contexts: string[]; +}; +declare type ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint = { + owner: string; + repo: string; + branch: string; + contexts: string[]; +}; +declare type ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint = { + owner: string; + repo: string; + branch: string; + contexts: string[]; +}; +declare type ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; + dismissal_restrictions?: object; + "dismissal_restrictions.users"?: string[]; + "dismissal_restrictions.teams"?: string[]; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; +}; +declare type ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetProtectedBranchRequiredSignaturesEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetProtectedBranchRequiredSignaturesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddProtectedBranchRequiredSignaturesEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposAddProtectedBranchRequiredSignaturesRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchRequiredSignaturesEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveProtectedBranchRequiredSignaturesRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetProtectedBranchAdminEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetProtectedBranchAdminEnforcementRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddProtectedBranchAdminEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposAddProtectedBranchAdminEnforcementRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchAdminEnforcementEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveProtectedBranchAdminEnforcementRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetProtectedBranchRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposGetProtectedBranchRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposRemoveProtectedBranchRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListProtectedBranchTeamRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + per_page?: number; + page?: number; +}; +declare type ReposListProtectedBranchTeamRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposReplaceProtectedBranchTeamRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + teams: string[]; +}; +declare type ReposReplaceProtectedBranchTeamRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddProtectedBranchTeamRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + teams: string[]; +}; +declare type ReposAddProtectedBranchTeamRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchTeamRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + teams: string[]; +}; +declare type ReposRemoveProtectedBranchTeamRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListProtectedBranchUserRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; +}; +declare type ReposListProtectedBranchUserRestrictionsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposReplaceProtectedBranchUserRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + users: string[]; +}; +declare type ReposReplaceProtectedBranchUserRestrictionsRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddProtectedBranchUserRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + users: string[]; +}; +declare type ReposAddProtectedBranchUserRestrictionsRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveProtectedBranchUserRestrictionsEndpoint = { + owner: string; + repo: string; + branch: string; + users: string[]; +}; +declare type ReposRemoveProtectedBranchUserRestrictionsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListCollaboratorsEndpoint = { + owner: string; + repo: string; + affiliation?: string; + per_page?: number; + page?: number; +}; +declare type ReposListCollaboratorsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCheckCollaboratorEndpoint = { + owner: string; + repo: string; + username: string; +}; +declare type ReposCheckCollaboratorRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCollaboratorPermissionLevelEndpoint = { + owner: string; + repo: string; + username: string; +}; +declare type ReposGetCollaboratorPermissionLevelRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddCollaboratorEndpoint = { + owner: string; + repo: string; + username: string; + permission?: string; +}; +declare type ReposAddCollaboratorRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveCollaboratorEndpoint = { + owner: string; + repo: string; + username: string; +}; +declare type ReposRemoveCollaboratorRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListCommitCommentsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListCommitCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListCommentsForCommitEndpoint = { + owner: string; + repo: string; + commit_sha: string; + per_page?: number; + page?: number; + ref?: string; +}; +declare type ReposListCommentsForCommitRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateCommitCommentEndpoint = { + owner: string; + repo: string; + commit_sha: string; + body: string; + path?: string; + position?: number; + line?: number; + sha?: string; +}; +declare type ReposCreateCommitCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCommitCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; +}; +declare type ReposGetCommitCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateCommitCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; + body: string; +}; +declare type ReposUpdateCommitCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteCommitCommentEndpoint = { + owner: string; + repo: string; + comment_id: number; +}; +declare type ReposDeleteCommitCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListCommitsEndpoint = { + owner: string; + repo: string; + sha?: string; + path?: string; + author?: string; + since?: string; + until?: string; + per_page?: number; + page?: number; +}; +declare type ReposListCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCommitEndpoint = { + owner: string; + repo: string; + ref: string; + sha?: string; + commit_sha?: string; +}; +declare type ReposGetCommitRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCommitRefShaEndpoint = { + owner: string; + repo: string; + ref: string; +}; +declare type ReposGetCommitRefShaRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCompareCommitsEndpoint = { + owner: string; + repo: string; + base: string; + head: string; +}; +declare type ReposCompareCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListBranchesForHeadCommitEndpoint = { + owner: string; + repo: string; + commit_sha: string; +}; +declare type ReposListBranchesForHeadCommitRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListPullRequestsAssociatedWithCommitEndpoint = { + owner: string; + repo: string; + commit_sha: string; + per_page?: number; + page?: number; +}; +declare type ReposListPullRequestsAssociatedWithCommitRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRetrieveCommunityProfileMetricsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposRetrieveCommunityProfileMetricsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetReadmeEndpoint = { + owner: string; + repo: string; + ref?: string; +}; +declare type ReposGetReadmeRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetContentsEndpoint = { + owner: string; + repo: string; + path: string; + ref?: string; +}; +declare type ReposGetContentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateOrUpdateFileEndpoint = { + owner: string; + repo: string; + path: string; + message: string; + content: string; + sha?: string; + branch?: string; + committer?: object; + "committer.name": string; + "committer.email": string; + author?: object; + "author.name": string; + "author.email": string; +}; +declare type ReposCreateOrUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateFileEndpoint = { + owner: string; + repo: string; + path: string; + message: string; + content: string; + sha?: string; + branch?: string; + committer?: object; + "committer.name": string; + "committer.email": string; + author?: object; + "author.name": string; + "author.email": string; +}; +declare type ReposCreateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateFileEndpoint = { + owner: string; + repo: string; + path: string; + message: string; + content: string; + sha?: string; + branch?: string; + committer?: object; + "committer.name": string; + "committer.email": string; + author?: object; + "author.name": string; + "author.email": string; +}; +declare type ReposUpdateFileRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteFileEndpoint = { + owner: string; + repo: string; + path: string; + message: string; + sha: string; + branch?: string; + committer?: object; + "committer.name"?: string; + "committer.email"?: string; + author?: object; + "author.name"?: string; + "author.email"?: string; +}; +declare type ReposDeleteFileRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetArchiveLinkEndpoint = { + owner: string; + repo: string; + archive_format: string; + ref: string; +}; +declare type ReposGetArchiveLinkRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListDeploymentsEndpoint = { + owner: string; + repo: string; + sha?: string; + ref?: string; + task?: string; + environment?: string; + per_page?: number; + page?: number; +}; +declare type ReposListDeploymentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetDeploymentEndpoint = { + owner: string; + repo: string; + deployment_id: number; +}; +declare type ReposGetDeploymentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateDeploymentEndpoint = { + owner: string; + repo: string; + ref: string; + task?: string; + auto_merge?: boolean; + required_contexts?: string[]; + payload?: string; + environment?: string; + description?: string; + transient_environment?: boolean; + production_environment?: boolean; +}; +declare type ReposCreateDeploymentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListDeploymentStatusesEndpoint = { + owner: string; + repo: string; + deployment_id: number; + per_page?: number; + page?: number; +}; +declare type ReposListDeploymentStatusesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetDeploymentStatusEndpoint = { + owner: string; + repo: string; + deployment_id: number; + status_id: number; +}; +declare type ReposGetDeploymentStatusRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateDeploymentStatusEndpoint = { + owner: string; + repo: string; + deployment_id: number; + state: string; + target_url?: string; + log_url?: string; + description?: string; + environment?: string; + environment_url?: string; + auto_inactive?: boolean; +}; +declare type ReposCreateDeploymentStatusRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListDownloadsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListDownloadsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetDownloadEndpoint = { + owner: string; + repo: string; + download_id: number; +}; +declare type ReposGetDownloadRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteDownloadEndpoint = { + owner: string; + repo: string; + download_id: number; +}; +declare type ReposDeleteDownloadRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListForksEndpoint = { + owner: string; + repo: string; + sort?: string; + per_page?: number; + page?: number; +}; +declare type ReposListForksRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateForkEndpoint = { + owner: string; + repo: string; + organization?: string; +}; +declare type ReposCreateForkRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListHooksEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListHooksRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetHookEndpoint = { + owner: string; + repo: string; + hook_id: number; +}; +declare type ReposGetHookRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateHookEndpoint = { + owner: string; + repo: string; + name?: string; + config: object; + "config.url": string; + "config.content_type"?: string; + "config.secret"?: string; + "config.insecure_ssl"?: string; + events?: string[]; + active?: boolean; +}; +declare type ReposCreateHookRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateHookEndpoint = { + owner: string; + repo: string; + hook_id: number; + config?: object; + "config.url": string; + "config.content_type"?: string; + "config.secret"?: string; + "config.insecure_ssl"?: string; + events?: string[]; + add_events?: string[]; + remove_events?: string[]; + active?: boolean; +}; +declare type ReposUpdateHookRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposTestPushHookEndpoint = { + owner: string; + repo: string; + hook_id: number; +}; +declare type ReposTestPushHookRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposPingHookEndpoint = { + owner: string; + repo: string; + hook_id: number; +}; +declare type ReposPingHookRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteHookEndpoint = { + owner: string; + repo: string; + hook_id: number; +}; +declare type ReposDeleteHookRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListInvitationsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteInvitationEndpoint = { + owner: string; + repo: string; + invitation_id: number; +}; +declare type ReposDeleteInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateInvitationEndpoint = { + owner: string; + repo: string; + invitation_id: number; + permissions?: string; +}; +declare type ReposUpdateInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListInvitationsForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type ReposListInvitationsForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAcceptInvitationEndpoint = { + invitation_id: number; +}; +declare type ReposAcceptInvitationRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeclineInvitationEndpoint = { + invitation_id: number; +}; +declare type ReposDeclineInvitationRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListDeployKeysEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListDeployKeysRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetDeployKeyEndpoint = { + owner: string; + repo: string; + key_id: number; +}; +declare type ReposGetDeployKeyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposAddDeployKeyEndpoint = { + owner: string; + repo: string; + title?: string; + key: string; + read_only?: boolean; +}; +declare type ReposAddDeployKeyRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRemoveDeployKeyEndpoint = { + owner: string; + repo: string; + key_id: number; +}; +declare type ReposRemoveDeployKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposMergeEndpoint = { + owner: string; + repo: string; + base: string; + head: string; + commit_message?: string; +}; +declare type ReposMergeRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetPagesEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetPagesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposEnablePagesSiteEndpoint = { + owner: string; + repo: string; + source?: object; + "source.branch"?: string; + "source.path"?: string; +}; +declare type ReposEnablePagesSiteRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDisablePagesSiteEndpoint = { + owner: string; + repo: string; +}; +declare type ReposDisablePagesSiteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateInformationAboutPagesSiteEndpoint = { + owner: string; + repo: string; + cname?: string; + source?: string; +}; +declare type ReposUpdateInformationAboutPagesSiteRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposRequestPageBuildEndpoint = { + owner: string; + repo: string; +}; +declare type ReposRequestPageBuildRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListPagesBuildsEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListPagesBuildsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetLatestPagesBuildEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetLatestPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetPagesBuildEndpoint = { + owner: string; + repo: string; + build_id: number; +}; +declare type ReposGetPagesBuildRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListReleasesEndpoint = { + owner: string; + repo: string; + per_page?: number; + page?: number; +}; +declare type ReposListReleasesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetReleaseEndpoint = { + owner: string; + repo: string; + release_id: number; +}; +declare type ReposGetReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetLatestReleaseEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetLatestReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetReleaseByTagEndpoint = { + owner: string; + repo: string; + tag: string; +}; +declare type ReposGetReleaseByTagRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateReleaseEndpoint = { + owner: string; + repo: string; + tag_name: string; + target_commitish?: string; + name?: string; + body?: string; + draft?: boolean; + prerelease?: boolean; +}; +declare type ReposCreateReleaseRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateReleaseEndpoint = { + owner: string; + repo: string; + release_id: number; + tag_name?: string; + target_commitish?: string; + name?: string; + body?: string; + draft?: boolean; + prerelease?: boolean; +}; +declare type ReposUpdateReleaseRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteReleaseEndpoint = { + owner: string; + repo: string; + release_id: number; +}; +declare type ReposDeleteReleaseRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListAssetsForReleaseEndpoint = { + owner: string; + repo: string; + release_id: number; + per_page?: number; + page?: number; +}; +declare type ReposListAssetsForReleaseRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUploadReleaseAssetEndpoint = { + url: string; + headers: object; + "headers.content-length": number; + "headers.content-type": string; + name: string; + label?: string; + file: string | object; +}; +declare type ReposUploadReleaseAssetRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetReleaseAssetEndpoint = { + owner: string; + repo: string; + asset_id: number; +}; +declare type ReposGetReleaseAssetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposUpdateReleaseAssetEndpoint = { + owner: string; + repo: string; + asset_id: number; + name?: string; + label?: string; +}; +declare type ReposUpdateReleaseAssetRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposDeleteReleaseAssetEndpoint = { + owner: string; + repo: string; + asset_id: number; +}; +declare type ReposDeleteReleaseAssetRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetContributorsStatsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetContributorsStatsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCommitActivityStatsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetCommitActivityStatsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCodeFrequencyStatsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetCodeFrequencyStatsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetParticipationStatsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetParticipationStatsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetPunchCardStatsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetPunchCardStatsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposCreateStatusEndpoint = { + owner: string; + repo: string; + sha: string; + state: string; + target_url?: string; + description?: string; + context?: string; +}; +declare type ReposCreateStatusRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposListStatusesForRefEndpoint = { + owner: string; + repo: string; + ref: string; + per_page?: number; + page?: number; +}; +declare type ReposListStatusesForRefRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetCombinedStatusForRefEndpoint = { + owner: string; + repo: string; + ref: string; +}; +declare type ReposGetCombinedStatusForRefRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetTopReferrersEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetTopReferrersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetTopPathsEndpoint = { + owner: string; + repo: string; +}; +declare type ReposGetTopPathsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetViewsEndpoint = { + owner: string; + repo: string; + per?: string; +}; +declare type ReposGetViewsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ReposGetClonesEndpoint = { + owner: string; + repo: string; + per?: string; +}; +declare type ReposGetClonesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimListProvisionedIdentitiesEndpoint = { + org: string; + startIndex?: number; + count?: number; + filter?: string; +}; +declare type ScimListProvisionedIdentitiesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimGetProvisioningDetailsForUserEndpoint = { + org: string; + scim_user_id: number; + external_identity_guid?: number; +}; +declare type ScimGetProvisioningDetailsForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimProvisionAndInviteUsersEndpoint = { + org: string; +}; +declare type ScimProvisionAndInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimProvisionInviteUsersEndpoint = { + org: string; +}; +declare type ScimProvisionInviteUsersRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimReplaceProvisionedUserInformationEndpoint = { + org: string; + scim_user_id: number; + external_identity_guid?: number; +}; +declare type ScimReplaceProvisionedUserInformationRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimUpdateProvisionedOrgMembershipEndpoint = { + org: string; + scim_user_id: number; + external_identity_guid?: number; +}; +declare type ScimUpdateProvisionedOrgMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimUpdateUserAttributeEndpoint = { + org: string; + scim_user_id: number; + external_identity_guid?: number; +}; +declare type ScimUpdateUserAttributeRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type ScimRemoveUserFromOrgEndpoint = { + org: string; + scim_user_id: number; + external_identity_guid?: number; +}; +declare type ScimRemoveUserFromOrgRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchReposEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchReposRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchCommitsEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchCommitsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchCodeEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchCodeRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchIssuesAndPullRequestsEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchIssuesAndPullRequestsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchIssuesEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchIssuesRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchUsersEndpoint = { + q: string; + sort?: string; + order?: string; + per_page?: number; + page?: number; +}; +declare type SearchUsersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchTopicsEndpoint = { + q: string; +}; +declare type SearchTopicsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchLabelsEndpoint = { + repository_id: number; + q: string; + sort?: string; + order?: string; +}; +declare type SearchLabelsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchIssuesLegacyEndpoint = { + owner: string; + repository: string; + state: string; + keyword: string; +}; +declare type SearchIssuesLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchReposLegacyEndpoint = { + keyword: string; + language?: string; + start_page?: string; + sort?: string; + order?: string; +}; +declare type SearchReposLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchUsersLegacyEndpoint = { + keyword: string; + start_page?: string; + sort?: string; + order?: string; +}; +declare type SearchUsersLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type SearchEmailLegacyEndpoint = { + email: string; +}; +declare type SearchEmailLegacyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type TeamsListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetEndpoint = { + team_id: number; +}; +declare type TeamsGetRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetByNameEndpoint = { + org: string; + team_slug: string; +}; +declare type TeamsGetByNameRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsCreateEndpoint = { + org: string; + name: string; + description?: string; + maintainers?: string[]; + repo_names?: string[]; + privacy?: string; + permission?: string; + parent_team_id?: number; +}; +declare type TeamsCreateRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsUpdateEndpoint = { + team_id: number; + name: string; + description?: string; + privacy?: string; + permission?: string; + parent_team_id?: number; +}; +declare type TeamsUpdateRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsDeleteEndpoint = { + team_id: number; +}; +declare type TeamsDeleteRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListChildEndpoint = { + team_id: number; + per_page?: number; + page?: number; +}; +declare type TeamsListChildRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListReposEndpoint = { + team_id: number; + per_page?: number; + page?: number; +}; +declare type TeamsListReposRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsCheckManagesRepoEndpoint = { + team_id: number; + owner: string; + repo: string; +}; +declare type TeamsCheckManagesRepoRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsAddOrUpdateRepoEndpoint = { + team_id: number; + owner: string; + repo: string; + permission?: string; +}; +declare type TeamsAddOrUpdateRepoRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsRemoveRepoEndpoint = { + team_id: number; + owner: string; + repo: string; +}; +declare type TeamsRemoveRepoRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type TeamsListForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListProjectsEndpoint = { + team_id: number; + per_page?: number; + page?: number; +}; +declare type TeamsListProjectsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsReviewProjectEndpoint = { + team_id: number; + project_id: number; +}; +declare type TeamsReviewProjectRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsAddOrUpdateProjectEndpoint = { + team_id: number; + project_id: number; + permission?: string; +}; +declare type TeamsAddOrUpdateProjectRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsRemoveProjectEndpoint = { + team_id: number; + project_id: number; +}; +declare type TeamsRemoveProjectRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListDiscussionCommentsEndpoint = { + team_id: number; + discussion_number: number; + direction?: string; + per_page?: number; + page?: number; +}; +declare type TeamsListDiscussionCommentsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + comment_number: number; +}; +declare type TeamsGetDiscussionCommentRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsCreateDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + body: string; +}; +declare type TeamsCreateDiscussionCommentRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsUpdateDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + comment_number: number; + body: string; +}; +declare type TeamsUpdateDiscussionCommentRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsDeleteDiscussionCommentEndpoint = { + team_id: number; + discussion_number: number; + comment_number: number; +}; +declare type TeamsDeleteDiscussionCommentRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListDiscussionsEndpoint = { + team_id: number; + direction?: string; + per_page?: number; + page?: number; +}; +declare type TeamsListDiscussionsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetDiscussionEndpoint = { + team_id: number; + discussion_number: number; +}; +declare type TeamsGetDiscussionRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsCreateDiscussionEndpoint = { + team_id: number; + title: string; + body: string; + private?: boolean; +}; +declare type TeamsCreateDiscussionRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsUpdateDiscussionEndpoint = { + team_id: number; + discussion_number: number; + title?: string; + body?: string; +}; +declare type TeamsUpdateDiscussionRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsDeleteDiscussionEndpoint = { + team_id: number; + discussion_number: number; +}; +declare type TeamsDeleteDiscussionRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListMembersEndpoint = { + team_id: number; + role?: string; + per_page?: number; + page?: number; +}; +declare type TeamsListMembersRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetMemberEndpoint = { + team_id: number; + username: string; +}; +declare type TeamsGetMemberRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsAddMemberEndpoint = { + team_id: number; + username: string; +}; +declare type TeamsAddMemberRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsRemoveMemberEndpoint = { + team_id: number; + username: string; +}; +declare type TeamsRemoveMemberRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsGetMembershipEndpoint = { + team_id: number; + username: string; +}; +declare type TeamsGetMembershipRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsAddOrUpdateMembershipEndpoint = { + team_id: number; + username: string; + role?: string; +}; +declare type TeamsAddOrUpdateMembershipRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsRemoveMembershipEndpoint = { + team_id: number; + username: string; +}; +declare type TeamsRemoveMembershipRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListPendingInvitationsEndpoint = { + team_id: number; + per_page?: number; + page?: number; +}; +declare type TeamsListPendingInvitationsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListIdPGroupsForOrgEndpoint = { + org: string; + per_page?: number; + page?: number; +}; +declare type TeamsListIdPGroupsForOrgRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsListIdPGroupsEndpoint = { + team_id: number; +}; +declare type TeamsListIdPGroupsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type TeamsCreateOrUpdateIdPGroupConnectionsEndpoint = { + team_id: number; + groups: object[]; + "groups[].group_id": string; + "groups[].group_name": string; + "groups[].group_description": string; +}; +declare type TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersGetByUsernameEndpoint = { + username: string; +}; +declare type UsersGetByUsernameRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersGetAuthenticatedEndpoint = {}; +declare type UsersGetAuthenticatedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersUpdateAuthenticatedEndpoint = { + name?: string; + email?: string; + blog?: string; + company?: string; + location?: string; + hireable?: boolean; + bio?: string; +}; +declare type UsersUpdateAuthenticatedRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersGetContextForUserEndpoint = { + username: string; + subject_type?: string; + subject_id?: string; +}; +declare type UsersGetContextForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListEndpoint = { + since?: string; + per_page?: number; + page?: number; +}; +declare type UsersListRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListBlockedEndpoint = {}; +declare type UsersListBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersCheckBlockedEndpoint = { + username: string; +}; +declare type UsersCheckBlockedRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersBlockEndpoint = { + username: string; +}; +declare type UsersBlockRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersUnblockEndpoint = { + username: string; +}; +declare type UsersUnblockRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListEmailsEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListPublicEmailsEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListPublicEmailsRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersAddEmailsEndpoint = { + emails: string[]; +}; +declare type UsersAddEmailsRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersDeleteEmailsEndpoint = { + emails: string[]; +}; +declare type UsersDeleteEmailsRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersTogglePrimaryEmailVisibilityEndpoint = { + email: string; + visibility: string; +}; +declare type UsersTogglePrimaryEmailVisibilityRequestOptions = { + method: "PATCH"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListFollowersForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type UsersListFollowersForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListFollowersForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListFollowersForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListFollowingForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type UsersListFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListFollowingForAuthenticatedUserEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListFollowingForAuthenticatedUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersCheckFollowingEndpoint = { + username: string; +}; +declare type UsersCheckFollowingRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersCheckFollowingForUserEndpoint = { + username: string; + target_user: string; +}; +declare type UsersCheckFollowingForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersFollowEndpoint = { + username: string; +}; +declare type UsersFollowRequestOptions = { + method: "PUT"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersUnfollowEndpoint = { + username: string; +}; +declare type UsersUnfollowRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListGpgKeysForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type UsersListGpgKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListGpgKeysEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListGpgKeysRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersGetGpgKeyEndpoint = { + gpg_key_id: number; +}; +declare type UsersGetGpgKeyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersCreateGpgKeyEndpoint = { + armored_public_key?: string; +}; +declare type UsersCreateGpgKeyRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersDeleteGpgKeyEndpoint = { + gpg_key_id: number; +}; +declare type UsersDeleteGpgKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListPublicKeysForUserEndpoint = { + username: string; + per_page?: number; + page?: number; +}; +declare type UsersListPublicKeysForUserRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersListPublicKeysEndpoint = { + per_page?: number; + page?: number; +}; +declare type UsersListPublicKeysRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersGetPublicKeyEndpoint = { + key_id: number; +}; +declare type UsersGetPublicKeyRequestOptions = { + method: "GET"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersCreatePublicKeyEndpoint = { + title?: string; + key?: string; +}; +declare type UsersCreatePublicKeyRequestOptions = { + method: "POST"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +declare type UsersDeletePublicKeyEndpoint = { + key_id: number; +}; +declare type UsersDeletePublicKeyRequestOptions = { + method: "DELETE"; + url: Url; + headers: Headers; + request: EndpointRequestOptions; +}; +export {}; diff --git a/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 000000000..9977f0902 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("./types").endpoint; diff --git a/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 000000000..966470f97 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { Defaults, Route, Parameters } from "./types"; +export declare function merge(defaults: Defaults | null, route?: Route | Parameters, options?: Parameters): Defaults; diff --git a/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 000000000..3bc65d692 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { Defaults, RequestOptions } from "./types"; +export declare function parse(options: Defaults): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/types.d.ts b/node_modules/@octokit/endpoint/dist-types/types.d.ts new file mode 100644 index 000000000..979c064fb --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/types.d.ts @@ -0,0 +1,150 @@ +import { Routes as KnownRoutes } from "./generated/routes"; +export interface endpoint { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: Endpoint): RequestOptions; + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: keyof KnownRoutes | R, options?: R extends keyof KnownRoutes ? KnownRoutes[R][0] & Parameters : Parameters): R extends keyof KnownRoutes ? KnownRoutes[R][1] : RequestOptions; + /** + * Object with current default route and parameters + */ + DEFAULTS: Defaults; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: Parameters) => endpoint; + merge: { + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * + */ + (route: Route, parameters?: Parameters): Defaults; + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: Parameters): Defaults; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): Defaults; + }; + /** + * Stateless method to turn endpoint options into request options. + * Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + * + * @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + parse: (options: Defaults) => RequestOptions; +} +/** + * Request method + URL. Example: `'GET /orgs/:org'` + */ +export declare type Route = string; +/** + * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` + */ +export declare type Url = string; +/** + * Request method + */ +export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; +/** + * Endpoint parameters + */ +export declare type Parameters = { + /** + * Base URL to be used when a relative URL is passed, such as `/orgs/:org`. + * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the resulting + * `RequestOptions.url` will be `https://enterprise.acme-inc.com/api/v3/orgs/:org`. + */ + baseUrl?: string; + /** + * HTTP headers. Use lowercase keys. + */ + headers?: Headers; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + /** + * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + /** + * Pass custom meta information for the request. The `request` object will be returned as is. + */ + request?: EndpointRequestOptions; + /** + * Any additional parameter will be passed as follows + * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` + * 2. Query parameter if `method` is `'GET'` or `'HEAD'` + * 3. Request body if `parameter` is `'data'` + * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` + */ + [parameter: string]: any; +}; +export declare type Endpoint = Parameters & { + method: Method; + url: Url; +}; +export declare type Defaults = Parameters & { + method: Method; + baseUrl: string; + headers: Headers & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; +export declare type RequestOptions = { + method: Method; + url: Url; + headers: Headers; + body?: any; + request?: EndpointRequestOptions; +}; +export declare type Headers = { + /** + * Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; +export declare type EndpointRequestOptions = { + [option: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 000000000..4b192ac41 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts @@ -0,0 +1,4 @@ +export declare function addQueryParameters(url: string, parameters: { + [x: string]: string | undefined; + q?: string; +}): string; diff --git a/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 000000000..93586d4db --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts @@ -0,0 +1 @@ +export declare function extractUrlVariableNames(url: string): string[]; diff --git a/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 000000000..2196dd40d --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,3 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): {}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 000000000..06927d6bd --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts @@ -0,0 +1,5 @@ +export declare function omit(object: { + [key: string]: any; +}, keysToOmit: string[]): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 000000000..15711f02c --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 000000000..bdbb3c5d1 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { Defaults, endpoint, Parameters } from "./types"; +export declare function withDefaults(oldDefaults: Defaults | null, newDefaults: Parameters): endpoint; diff --git a/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 000000000..aff43a77c --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,233 @@ +import deepmerge from 'deepmerge'; +import isPlainObject from 'is-plain-object'; +import urlTemplate from 'url-template'; +import getUserAgent from 'universal-user-agent'; + +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); +} + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); +} + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let _route$split = route.split(" "), + _route$split2 = _slicedToArray(_route$split, 2), + method = _route$split2[0], + url = _route$split2[1]; + + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = route || {}; + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); + const mergedOptions = deepmerge.all([defaults, options].filter(Boolean), { + isMergeableObject: isPlainObject + }); // 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 "".concat(name, "=").concat(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; + }, {}); +} + +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 = urlTemplate.parse(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.".concat(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 ? ".".concat(options.mediaType.format) : "+json"; + return "application/vnd.github.".concat(preview, "-preview").concat(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 = "0.0.0-development"; + +const userAgent = "octokit-endpoint.js/".concat(VERSION, " ").concat(getUserAgent()); +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); + +export { endpoint }; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE new file mode 100644 index 000000000..3f2eca18f --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md b/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md new file mode 100644 index 000000000..60b7b591f --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md @@ -0,0 +1,119 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +import isPlainObject from 'is-plain-object'; +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [TrySound](https://github.com/TrySound) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js new file mode 100644 index 000000000..d7dda9510 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +module.exports = isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts new file mode 100644 index 000000000..fd131f01c --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,3 @@ +declare function isPlainObject(o: any): boolean; + +export default isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js new file mode 100644 index 000000000..565ce9e43 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js @@ -0,0 +1,35 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +import isObject from 'isobject'; + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +export default function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json new file mode 100644 index 000000000..85cdf8df8 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json @@ -0,0 +1,124 @@ +{ + "_from": "is-plain-object@^3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/@octokit/endpoint/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-plain-object@^3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_shasum": "47bfc5da1b5d50d64110806c199359482e75a928", + "_spec": "is-plain-object@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^4.0.0" + }, + "deprecated": false, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^2.0.2", + "rollup": "^1.10.1", + "rollup-plugin-node-resolve": "^4.2.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.0" +} diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE b/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE new file mode 100644 index 000000000..943e71d05 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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. \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/README.md b/node_modules/@octokit/endpoint/node_modules/isobject/README.md new file mode 100644 index 000000000..1c6e21fa0 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/README.md @@ -0,0 +1,127 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +## Usage + +```js +import isObject from 'isobject'; +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 30 | [jonschlinkert](https://github.com/jonschlinkert) | +| 8 | [doowb](https://github.com/doowb) | +| 7 | [TrySound](https://github.com/TrySound) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | +| 1 | [ZhouHansen](https://github.com/ZhouHansen) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js new file mode 100644 index 000000000..49debe736 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js @@ -0,0 +1,14 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +module.exports = isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts b/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts new file mode 100644 index 000000000..c471c7156 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts @@ -0,0 +1,3 @@ +declare function isObject(val: any): boolean; + +export default isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.js new file mode 100644 index 000000000..e9f038225 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/index.js @@ -0,0 +1,10 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +export default function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/package.json b/node_modules/@octokit/endpoint/node_modules/isobject/package.json new file mode 100644 index 000000000..774f44136 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/isobject/package.json @@ -0,0 +1,125 @@ +{ + "_from": "isobject@^4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/@octokit/endpoint/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isobject@^4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_shasum": "3f1c9155e73b192022a80819bacd0343711697b0", + "_spec": "isobject@^4.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint\\node_modules\\is-plain-object", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "esm": "^3.2.22", + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5", + "rollup": "^1.10.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.travis.yml b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.travis.yml new file mode 100644 index 000000000..ebafc54d6 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/.travis.yml @@ -0,0 +1,35 @@ +language: node_js +cache: npm + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +stages: + - test + - name: release + if: branch = master AND type IN (push) + +jobs: + include: + - stage: test + node_js: 12 + script: npm run test + - node_js: 8 + script: npm run test + - node_js: 10 + env: Node 10 & coverage upload + script: + - npm run test + - npm run coverage:upload + - node_js: lts/* + env: browser tests + script: npm run test:browser + + - stage: release + node_js: lts/* + env: semantic-release + script: npm run semantic-release diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 000000000..f105ab0c0 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md new file mode 100644 index 000000000..59e809ed8 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const getUserAgent = require('universal-user-agent') +const userAgent = getUserAgent() + +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/browser.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/browser.js new file mode 100644 index 000000000..eb1274439 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/browser.js @@ -0,0 +1,6 @@ +module.exports = getUserAgentBrowser + +function getUserAgentBrowser () { + /* global navigator */ + return navigator.userAgent +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/cypress.json b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/cypress.json new file mode 100644 index 000000000..a1ff4b85e --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/cypress.json @@ -0,0 +1,4 @@ +{ + "integrationFolder": "test", + "video": false +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 000000000..04dfc0435 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1 @@ +export default function getUserAgentNode(): string; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.js new file mode 100644 index 000000000..ef2d06b28 --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.js @@ -0,0 +1,15 @@ +module.exports = getUserAgentNode + +const osName = require('os-name') + +function getUserAgentNode () { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return 'Windows ' + } + + throw error + } +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json new file mode 100644 index 000000000..4f173b62c --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json @@ -0,0 +1,82 @@ +{ + "_from": "universal-user-agent@^3.0.0", + "_id": "universal-user-agent@3.0.0", + "_inBundle": false, + "_integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "_location": "/@octokit/endpoint/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "universal-user-agent@^3.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "_shasum": "4cc88d68097bffd7ac42e3b7c903e7481424b4b9", + "_spec": "universal-user-agent@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "os-name": "^3.0.0" + }, + "deprecated": false, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.2", + "cypress": "^3.1.0", + "mocha": "^6.0.0", + "nyc": "^14.0.0", + "proxyquire": "^2.1.0", + "semantic-release": "^15.9.15", + "sinon": "^7.2.4", + "sinon-chai": "^3.2.0", + "standard": "^13.0.1", + "test": "^0.6.0", + "travis-deploy-once": "^5.0.7" + }, + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "universal-user-agent", + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "scripts": { + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "nyc mocha \"test/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "travis-deploy-once": "travis-deploy-once" + }, + "standard": { + "globals": [ + "describe", + "it", + "beforeEach", + "afterEach", + "expect" + ] + }, + "types": "index.d.ts", + "version": "3.0.0" +} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test/smoke-test.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test/smoke-test.js new file mode 100644 index 000000000..d71b2d51c --- /dev/null +++ b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/test/smoke-test.js @@ -0,0 +1,57 @@ +// make tests run in both Node & Express +if (!global.cy) { + const chai = require('chai') + const sinon = require('sinon') + const sinonChai = require('sinon-chai') + chai.use(sinonChai) + global.expect = chai.expect + + let sandbox + beforeEach(() => { + sandbox = sinon.createSandbox() + global.cy = { + stub: function () { + return sandbox.stub.apply(sandbox, arguments) + }, + log () { + console.log.apply(console, arguments) + } + } + }) + + afterEach(() => { + sandbox.restore() + }) +} + +const getUserAgent = require('..') + +describe('smoke', () => { + it('works', () => { + expect(getUserAgent()).to.be.a('string') + expect(getUserAgent().length).to.be.above(10) + }) + + if (!process.browser) { // test on node only + const proxyquire = require('proxyquire').noCallThru() + it('works around wmic error on Windows (#5)', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('Command failed: wmic os get Caption') + } + }) + + expect(getUserAgent()).to.equal('Windows ') + }) + + it('does not swallow unexpected errors', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('oops') + } + }) + + expect(getUserAgent).to.throw('oops') + }) + } +}) diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json new file mode 100644 index 000000000..0699b4010 --- /dev/null +++ b/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,88 @@ +{ + "_from": "@octokit/endpoint@^5.1.0", + "_id": "@octokit/endpoint@5.3.2", + "_inBundle": false, + "_integrity": "sha512-gRjteEM9I6f4D8vtwU2iGUTn9RX/AJ0SVXiqBUEuYEWVGGAVjSXdT0oNmghH5lvQNWs8mwt6ZaultuG6yXivNw==", + "_location": "/@octokit/endpoint", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@octokit/endpoint@^5.1.0", + "name": "@octokit/endpoint", + "escapedName": "@octokit%2fendpoint", + "scope": "@octokit", + "rawSpec": "^5.1.0", + "saveSpec": null, + "fetchSpec": "^5.1.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.2.tgz", + "_shasum": "2deda2d869cac9ba7f370287d55667be2a808d4b", + "_spec": "@octokit/endpoint@^5.1.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "bugs": { + "url": "https://github.com/octokit/endpoint.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "deepmerge": "4.0.0", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^3.0.0", + "url-template": "^2.0.8" + }, + "deprecated": false, + "description": "Turns REST API endpoints into generic request options", + "devDependencies": { + "@octokit/routes": "20.9.2", + "@pika/pack": "^0.4.0", + "@pika/plugin-build-node": "^0.4.0", + "@pika/plugin-build-web": "^0.4.0", + "@pika/plugin-ts-standard-pkg": "^0.4.0", + "@types/jest": "^24.0.11", + "@types/url-template": "^2.0.28", + "glob": "^7.1.3", + "handlebars": "^4.1.2", + "jest": "^24.7.1", + "lodash.set": "^4.3.2", + "nyc": "^14.0.0", + "pascal-case": "^2.0.1", + "prettier": "1.18.2", + "semantic-release": "^15.13.8", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/endpoint.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/endpoint", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/endpoint.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.3.2" +} diff --git a/node_modules/@octokit/graphql/LICENSE b/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/node_modules/@octokit/graphql/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit 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/node_modules/@octokit/graphql/README.md b/node_modules/@octokit/graphql/README.md new file mode 100644 index 000000000..4e44592ce --- /dev/null +++ b/node_modules/@octokit/graphql/README.md @@ -0,0 +1,292 @@ +# graphql.js + +> GitHub GraphQL API client for browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/graphql.svg)](https://www.npmjs.com/package/@octokit/graphql) +[![Build Status](https://travis-ci.com/octokit/graphql.js.svg?branch=master)](https://travis-ci.com/octokit/graphql.js) +[![Coverage Status](https://coveralls.io/repos/github/octokit/graphql.js/badge.svg)](https://coveralls.io/github/octokit/graphql.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/graphql.js.svg)](https://greenkeeper.io/) + + + +- [Usage](#usage) +- [Errors](#errors) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + +Send a simple query + +```js +const graphql = require('@octokit/graphql') +const { repository } = await graphql(`{ + repository(owner:"octokit", name:"graphql.js") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`, { + headers: { + authorization: `token secret123` + } +}) +``` + +⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead: + +```js +const graphql = require('@octokit/graphql') +const { lastIssues } = await graphql(`query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner:$owner, name:$repo) { + issues(last:$num) { + edges { + node { + title + } + } + } + } + }`, { + owner: 'octokit', + repo: 'graphql.js' + headers: { + authorization: `token secret123` + } + } +}) +``` + +Create two new clients and set separate default configs for them. + +```js +const graphql1 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) + +const graphql2 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token foobar` + } +}) +``` + +Create two clients, the second inherits config from the first. + +```js +const graphql1 = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) + +const graphql2 = graphql1.defaults({ + headers: { + 'user-agent': 'my-user-agent/v1.2.3' + } +}) +``` + +Create a new client with default options and run query + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const { repository } = await graphql(`{ + repository(owner:"octokit", name:"graphql.js") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`) +``` + +Pass query together with headers and variables + +```js +const graphql = require('@octokit/graphql') +const { lastIssues } = await graphql({ + query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner:$owner, name:$repo) { + issues(last:$num) { + edges { + node { + title + } + } + } + } + }`, + owner: 'octokit', + repo: 'graphql.js' + headers: { + authorization: `token secret123` + } +}) +``` + +Use with GitHub Enterprise + +```js +const graphql = require('@octokit/graphql').defaults({ + baseUrl: 'https://github-enterprise.acme-inc.com/api', + headers: { + authorization: `token secret123` + } +}) +const { repository } = await graphql(`{ + repository(owner:"acme-project", name:"acme-repo") { + issues(last:3) { + edges { + node { + title + } + } + } + } +}`) +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to the first error from the response’s `errors` array. All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging. + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const query = `{ + viewer { + bioHtml + } +}` + +try { + const result = await graphql(query) +} catch (error) { + // server responds with + // { + // "data": null, + // "errors": [{ + // "message": "Field 'bioHtml' doesn't exist on type 'User'", + // "locations": [{ + // "line": 3, + // "column": 5 + // }] + // }] + // } + + console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message) // Field 'bioHtml' doesn't exist on type 'User' +} +``` + +## Partial responses + +A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data` + +```js +const graphql = require('@octokit/graphql').defaults({ + headers: { + authorization: `token secret123` + } +}) +const query = `{ + repository(name: "probot", owner: "probot") { + name + ref(qualifiedName: "master") { + target { + ... on Commit { + history(first: 25, after: "invalid cursor") { + nodes { + message + } + } + } + } + } + } +}` + +try { + const result = await graphql(query) +} catch (error) { + // server responds with + // {  + // "data": {  + // "repository": {  + // "name": "probot",  + // "ref": null  + // }  + // },  + // "errors": [  + // {  + // "type": "INVALID_CURSOR_ARGUMENTS",  + // "path": [  + // "repository",  + // "ref",  + // "target",  + // "history"  + // ],  + // "locations": [  + // {  + // "line": 7,  + // "column": 11  + // }  + // ],  + // "message": "`invalid cursor` does not appear to be a valid cursor."  + // }  + // ]  + // }  + + console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message) // `invalid cursor` does not appear to be a valid cursor. + console.log(error.data) // { repository: { name: 'probot', ref: null } } +} +``` + +## Writing tests + +You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests + +```js +const assert = require('assert') +const fetchMock = require('fetch-mock/es5/server') + +const graphql = require('@octokit/graphql') + +graphql('{ viewer { login } }', { + headers: { + authorization: 'token secret123' + }, + request: { + fetch: fetchMock.sandbox() + .post('https://api.github.com/graphql', (url, options) => { + assert.strictEqual(options.headers.authorization, 'token secret123') + assert.strictEqual(options.body, '{"query":"{ viewer { login } }"}', 'Sends correct query') + return { data: {} } + }) + } +}) +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/index.js b/node_modules/@octokit/graphql/index.js new file mode 100644 index 000000000..7f8278c9b --- /dev/null +++ b/node_modules/@octokit/graphql/index.js @@ -0,0 +1,15 @@ +const { request } = require('@octokit/request') +const getUserAgent = require('universal-user-agent') + +const version = require('./package.json').version +const userAgent = `octokit-graphql.js/${version} ${getUserAgent()}` + +const withDefaults = require('./lib/with-defaults') + +module.exports = withDefaults(request, { + method: 'POST', + url: '/graphql', + headers: { + 'user-agent': userAgent + } +}) diff --git a/node_modules/@octokit/graphql/lib/error.js b/node_modules/@octokit/graphql/lib/error.js new file mode 100644 index 000000000..4478abd27 --- /dev/null +++ b/node_modules/@octokit/graphql/lib/error.js @@ -0,0 +1,16 @@ +module.exports = 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) + } + } +} diff --git a/node_modules/@octokit/graphql/lib/graphql.js b/node_modules/@octokit/graphql/lib/graphql.js new file mode 100644 index 000000000..4a5b21195 --- /dev/null +++ b/node_modules/@octokit/graphql/lib/graphql.js @@ -0,0 +1,36 @@ +module.exports = graphql + +const GraphqlError = require('./error') + +const NON_VARIABLE_OPTIONS = ['method', 'baseUrl', 'url', 'headers', 'request', 'query'] + +function graphql (request, query, options) { + if (typeof query === 'string') { + options = Object.assign({ query }, options) + } else { + 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, response) + } + + return response.data.data + }) +} diff --git a/node_modules/@octokit/graphql/lib/with-defaults.js b/node_modules/@octokit/graphql/lib/with-defaults.js new file mode 100644 index 000000000..a5b14935c --- /dev/null +++ b/node_modules/@octokit/graphql/lib/with-defaults.js @@ -0,0 +1,13 @@ +module.exports = withDefaults + +const graphql = require('./graphql') + +function withDefaults (request, newDefaults) { + const newRequest = request.defaults(newDefaults) + const newApi = function (query, options) { + return graphql(newRequest, query, options) + } + + newApi.defaults = withDefaults.bind(null, newRequest) + return newApi +} diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json new file mode 100644 index 000000000..da66a8aee --- /dev/null +++ b/node_modules/@octokit/graphql/package.json @@ -0,0 +1,119 @@ +{ + "_from": "@octokit/graphql@^2.0.1", + "_id": "@octokit/graphql@2.1.3", + "_inBundle": false, + "_integrity": "sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==", + "_location": "/@octokit/graphql", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@octokit/graphql@^2.0.1", + "name": "@octokit/graphql", + "escapedName": "@octokit%2fgraphql", + "scope": "@octokit", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz", + "_shasum": "60c058a0ed5fa242eca6f938908d95fd1a2f4b92", + "_spec": "@octokit/graphql@^2.0.1", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\toolkit\\actions-github-0.0.0.tgz", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/graphql.js/issues" + }, + "bundleDependencies": false, + "bundlesize": [ + { + "path": "./dist/octokit-graphql.min.js.gz", + "maxSize": "5KB" + } + ], + "dependencies": { + "@octokit/request": "^5.0.0", + "universal-user-agent": "^2.0.3" + }, + "deprecated": false, + "description": "GitHub GraphQL API client for browsers and Node", + "devDependencies": { + "chai": "^4.2.0", + "compression-webpack-plugin": "^2.0.0", + "coveralls": "^3.0.3", + "cypress": "^3.1.5", + "fetch-mock": "^7.3.1", + "mkdirp": "^0.5.1", + "mocha": "^6.0.0", + "npm-run-all": "^4.1.3", + "nyc": "^14.0.0", + "semantic-release": "^15.13.3", + "simple-mock": "^0.8.0", + "standard": "^12.0.1", + "webpack": "^4.29.6", + "webpack-bundle-analyzer": "^3.1.0", + "webpack-cli": "^3.2.3" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/octokit/graphql.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "license": "MIT", + "main": "index.js", + "name": "@octokit/graphql", + "publishConfig": { + "access": "public" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*", + "!dist/*.map.gz" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/graphql.js.git" + }, + "scripts": { + "build": "npm-run-all build:*", + "build:development": "webpack --mode development --entry . --output-library=octokitGraphql --output=./dist/octokit-graphql.js --profile --json > dist/bundle-stats.json", + "build:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=octokitGraphql --output-path=./dist --output-filename=octokit-graphql.min.js --devtool source-map", + "bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "prebuild": "mkdirp dist/", + "pretest": "standard", + "test": "nyc mocha test/*-test.js", + "test:browser": "cypress run --browser chrome" + }, + "standard": { + "globals": [ + "describe", + "before", + "beforeEach", + "afterEach", + "after", + "it", + "expect" + ] + }, + "version": "2.1.3" +} diff --git a/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 000000000..ef2c18ee5 --- /dev/null +++ b/node_modules/@octokit/request-error/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit 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/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/request-error/README.md new file mode 100644 index 000000000..bcb711d91 --- /dev/null +++ b/node_modules/@octokit/request-error/README.md @@ -0,0 +1,68 @@ +# http-error.js + +> Error class for Octokit request errors + +[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error) +[![Build Status](https://travis-ci.com/octokit/request-error.js.svg?branch=master)](https://travis-ci.com/octokit/request-error.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request-error.js.svg)](https://greenkeeper.io/) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request-error + +```js +const { RequestError } = require("@octokit/request-error"); +// or: import { RequestError } from "@octokit/request-error"; +``` + +
+ +```js +const error = new RequestError("Oops", 500, { + headers: { + "x-github-request-id": "1:2:3:4" + }, // response headers + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz" + }, + headers: { + authorization: "token secret123" + } + } +}); + +error.message; // Oops +error.status; // 500 +error.headers; // { 'x-github-request-id': '1:2:3:4' } +error.request.method; // POST +error.request.url; // https://api.github.com/foo +error.request.body; // { bar: 'baz' } +error.request.headers; // { authorization: 'token [REDACTED]' } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 000000000..aa89664c2 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deprecation = require('deprecation'); +var once = _interopDefault(require('once')); + +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; diff --git a/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 000000000..10eb5c7e6 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,40 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnce = once((deprecation) => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ +export 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("[@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; + } +} diff --git a/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 000000000..b12f21d8e --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,26 @@ +import { RequestOptions, ResponseHeaders, RequestErrorOptions } from "./types"; +/** + * Error with extra properties to help with debugging + */ +export declare class RequestError extends Error { + name: "HttpError"; + /** + * http status code + */ + status: number; + /** + * http status code + * + * @deprecated `error.code` is deprecated in favor of `error.status` + */ + code: number; + /** + * error response headers + */ + headers: ResponseHeaders; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 000000000..444254eff --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,37 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` + */ +export declare type Url = string; +/** + * Request method + */ +export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; +export declare type RequestHeaders = { + /** + * Used for API previews and custom formats + */ + accept?: string; + /** + * Redacted authorization header + */ + authorization?: string; + "user-agent"?: string; + [header: string]: string | number | undefined; +}; +export declare type ResponseHeaders = { + [header: string]: string; +}; +export declare type EndpointRequestOptions = { + [option: string]: any; +}; +export declare type RequestOptions = { + method: Method; + url: Url; + headers: RequestHeaders; + body?: any; + request?: EndpointRequestOptions; +}; +export declare type RequestErrorOptions = { + headers: ResponseHeaders; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 000000000..52ff28a3a --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,48 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +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("[@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; + } + +} + +export { RequestError }; diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json new file mode 100644 index 000000000..1248a429b --- /dev/null +++ b/node_modules/@octokit/request-error/package.json @@ -0,0 +1,81 @@ +{ + "_from": "@octokit/request-error@^1.0.1", + "_id": "@octokit/request-error@1.0.4", + "_inBundle": false, + "_integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==", + "_location": "/@octokit/request-error", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@octokit/request-error@^1.0.1", + "name": "@octokit/request-error", + "escapedName": "@octokit%2frequest-error", + "scope": "@octokit", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz", + "_shasum": "15e1dc22123ba4a9a4391914d80ec1e5303a23be", + "_spec": "@octokit/request-error@^1.0.1", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "bugs": { + "url": "https://github.com/octokit/request-error.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "deprecated": false, + "description": "Error class for Octokit request errors", + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.4.0", + "@pika/plugin-build-web": "^0.4.0", + "@pika/plugin-bundle-web": "^0.4.0", + "@pika/plugin-ts-standard-pkg": "^0.4.0", + "@semantic-release/git": "^7.0.12", + "@types/jest": "^24.0.12", + "@types/node": "^12.0.2", + "@types/once": "^1.4.0", + "jest": "^24.7.1", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "^1.17.0", + "semantic-release": "^15.10.5", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request-error.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/request-error", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request-error.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "1.0.4" +} diff --git a/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/request/LICENSE new file mode 100644 index 000000000..af5366d0d --- /dev/null +++ b/node_modules/@octokit/request/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit 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/node_modules/@octokit/request/README.md b/node_modules/@octokit/request/README.md new file mode 100644 index 000000000..81e599be5 --- /dev/null +++ b/node_modules/@octokit/request/README.md @@ -0,0 +1,495 @@ +# request.js + +> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/request.svg)](https://www.npmjs.com/package/@octokit/request) +[![Build Status](https://travis-ci.org/octokit/request.js.svg?branch=master)](https://travis-ci.org/octokit/request.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/request.js.svg)](https://greenkeeper.io/) + +`@octokit/request` is a request library for browsers & node that makes it easier +to interact with [GitHub’s REST API](https://developer.github.com/v3/) and +[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint). + +It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse +the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +([node-fetch](https://github.com/bitinn/node-fetch) in Node). + + + + + +- [Features](#features) +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) + - [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Features + +🤩 1:1 mapping of REST API endpoint documentation, e.g. [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) becomes + +```js +request("POST /repos/:owner/:repo/issues/:number/labels", { + mediaType: { + previews: ["symmetra"] + }, + owner: "ocotkit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"] +}); +``` + +👍 Sensible defaults + +- `baseUrl`: `https://api.github.com` +- `headers.accept`: `application/vnd.github.v3+json` +- `headers.agent`: `octokit-request.js/ `, e.g. `octokit-request.js/1.2.3 Node.js/10.15.0 (macOS Mojave; x64)` + +👌 Simple to test: mock requests by passing a custom fetch method. + +🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials). + +👶 Small bundle size (\<5kb minified + gzipped) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.pika.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request + +```js +const { request } = require("@octokit/request"); +// or: import { request } from "@octokit/request"; +``` + +
+ +### REST API example + +```js +// Following GitHub docs formatting: +// https://developer.github.com/v3/repos/#list-organization-repositories +const result = await request("GET /orgs/:org/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); + +console.log(`${result.data.length} repos found.`); +``` + +### GraphQL example + +```js +const result = await request("POST /graphql", { + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + query: `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + variables: { + login: "octokit" + } +}); +``` + +### Alternative: pass `method` & `url` as part of options + +Alternatively, pass in a method and a url + +```js +const result = await request({ + method: "GET", + url: "/orgs/:org/repos", + headers: { + authorization: "token 0000000000000000000000000000000000000001" + }, + org: "octokit", + type: "private" +}); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/:org +
+ options.baseUrl + + String + + Required. Any supported http verb, case insensitive. Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-rest.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
Use options.mediaType.{format,previews} to request API previews and custom media types. +
+ options.mediaType.format + + String + + Media type param, such as `raw`, `html`, or `full`. See Media Types. +
+ options.mediaType.previews + + Array of strings + + Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See API Previews. +
+ options.method + + String + + Required. Any supported http verb, case insensitive. Defaults to Get. +
+ options.url + + String + + Required. A path or full URL which may contain :variable or {variable} placeholders, + e.g. /orgs/:org/repos. The url is parsed using url-template. +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The `data` parameter" below. +
+ options.request.agent + + http(s).Agent instance + + Node only. Useful for custom proxy, certificate, or dns lookup. +
+ options.request.fetch + + Function + + Custom replacement for built-in fetch method. Useful for testing or request hooks. +
+ options.request.hook + + Function + + Function with the signature hook(request, endpointOptions), where endpointOptions are the parsed options as returned by endpoint.merge(), and request is request(). This option works great in conjuction with before-after-hook. +
+ options.request.signal + + new AbortController().signal + + Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. +
+ options.request.timeout + + Number + + Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). options.request.signal is recommended instead. +
+ +All other options except `options.request.*` will be passed depending on the `method` and `url` options. + +1. If the option key is a placeholder in the `url`, it will be used as replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos` +2. If the `method` is `GET` or `HEAD`, the option is passed as query parameter +3. Otherwise the parameter is passed in the request body as JSON key. + +**Result** + +`request` returns a promise and resolves with 4 keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
statusIntegerResponse status status
urlStringURL of response. If a request results in redirects, this is the final URL. You can send a HEAD request to retrieve it without loading the full response body.
headersObjectAll response headers
dataAnyThe response body as returned from server. If the response is JSON then it will be parsed into an object
+ +If an error occurs, the `error` instance has additional properties to help with debugging + +- `error.status` The http response status code +- `error.headers` The http response headers as an object +- `error.request` The request options such as `method`, `url` and `data` + +## `request.defaults()` + +Override or set default options. Example: + +```js +const myrequest = require("@octokit/request").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001` + }, + org: "my-project", + per_page: 100 +}); + +myrequest(`GET /orgs/:org/repos`); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectRequest = request.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3" + }, + org: "my-project" +}); +const myProjectRequestWithAuth = myProjectRequest.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001` + } +}); +``` + +`myProjectRequest` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +## `request.endpoint` + +See https://github.com/octokit/endpoint.js. Example + +```js +const options = request.endpoint("GET /orgs/:org/repos", { + org: "my-project", + type: "private" +}); + +// { +// method: 'GET', +// url: 'https://api.github.com/orgs/my-project/repos?type=private', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: 'token 0000000000000000000000000000000000000001', +// 'user-agent': 'octokit/endpoint.js v1.2.3' +// } +// } +``` + +All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used: + +- [`ocotkitRequest.endpoint()`](#endpoint) +- [`ocotkitRequest.endpoint.defaults()`](#endpointdefaults) +- [`ocotkitRequest.endpoint.merge()`](#endpointdefaults) +- [`ocotkitRequest.endpoint.parse()`](#endpointmerge) + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const response = await request("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain" + } +}); + +// Request is sent as +// +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +// +// not as +// +// { +// ... +// body: '{"data": "Hello world github/linguist#1 **cool**, and #1!"}' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +request( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001` + }, + data: "Hello, world!" + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 000000000..2e6d51a21 --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,143 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var endpoint = require('@octokit/endpoint'); +var getUserAgent = _interopDefault(require('universal-user-agent')); +var isPlainObject = _interopDefault(require('is-plain-object')); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "0.0.0-development"; + +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 requsets + + + 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 { + Object.assign(error, JSON.parse(error.message)); + } 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} ${getUserAgent()}` + } +}); + +exports.request = request; diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 000000000..6592532e6 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,88 @@ +import isPlainObject from "is-plain-object"; +import nodeFetch from "node-fetch"; +import { RequestError } from "@octokit/request-error"; +import getBuffer from "./get-buffer-response"; +export default 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 requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + Object.assign(error, JSON.parse(error.message)); + } + 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 getBuffer(response); + }) + .then(data => { + return { + status, + url, + headers, + data + }; + }) + .catch(error => { + if (error instanceof RequestError) { + throw error; + } + throw new RequestError(error.message, 500, { + headers, + request: requestOptions + }); + }); +} diff --git a/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 000000000..845a3947b --- /dev/null +++ b/node_modules/@octokit/request/dist-src/get-buffer-response.js @@ -0,0 +1,3 @@ +export default function getBufferResponse(response) { + return response.arrayBuffer(); +} diff --git a/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 000000000..ef127524e --- /dev/null +++ b/node_modules/@octokit/request/dist-src/index.js @@ -0,0 +1,9 @@ +import { endpoint } from "@octokit/endpoint"; +import getUserAgent from "universal-user-agent"; +import { VERSION } from "./version"; +import withDefaults from "./with-defaults"; +export const request = withDefaults(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}); diff --git a/node_modules/@octokit/request/dist-src/types.js b/node_modules/@octokit/request/dist-src/types.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 000000000..86383b116 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 000000000..8e44f46e4 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/with-defaults.js @@ -0,0 +1,22 @@ +import fetchWrapper from "./fetch-wrapper"; +export default 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) + }); +} diff --git a/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 000000000..0308f6933 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { endpoint } from "./types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: string; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 000000000..915b70577 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts @@ -0,0 +1,2 @@ +import { Response } from "node-fetch"; +export default function getBufferResponse(response: Response): Promise; diff --git a/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 000000000..e2cff5d4a --- /dev/null +++ b/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("./types").request; diff --git a/node_modules/@octokit/request/dist-types/types.d.ts b/node_modules/@octokit/request/dist-types/types.d.ts new file mode 100644 index 000000000..f20f2b589 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/types.d.ts @@ -0,0 +1,152 @@ +/// +import { Agent } from "http"; +import { endpoint } from "@octokit/endpoint"; +export interface request { + /** + * Sends a request based on endpoint options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: Endpoint): Promise>; + /** + * Sends a request based on endpoint options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: Route, parameters?: Parameters): Promise>; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: Parameters) => request; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: typeof endpoint; +} +export declare type endpoint = typeof endpoint; +/** + * Request method + URL. Example: `'GET /orgs/:org'` + */ +export declare type Route = string; +/** + * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` + */ +export declare type Url = string; +/** + * Request method + */ +export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; +/** + * Endpoint parameters + */ +export declare type Parameters = { + /** + * Base URL to be used when a relative URL is passed, such as `/orgs/:org`. + * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request + * will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/:org`. + */ + baseUrl?: string; + /** + * HTTP headers. Use lowercase keys. + */ + headers?: RequestHeaders; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + /** + * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + /** + * Pass custom meta information for the request. The `request` object will be returned as is. + */ + request?: OctokitRequestOptions; + /** + * Any additional parameter will be passed as follows + * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` + * 2. Query parameter if `method` is `'GET'` or `'HEAD'` + * 3. Request body if `parameter` is `'data'` + * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` + */ + [parameter: string]: any; +}; +export declare type Endpoint = Parameters & { + method: Method; + url: Url; +}; +export declare type Defaults = Parameters & { + method: Method; + baseUrl: string; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; +export declare type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: number; + /** + * URL of response after all redirects + */ + url: string; + /** + * This is the data you would see in https://developer.Octokit.com/v3/ + */ + data: T; +}; +export declare type AnyResponse = OctokitResponse; +export declare type RequestHeaders = { + /** + * Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; +export declare type ResponseHeaders = { + [header: string]: string; +}; +export declare type Fetch = any; +export declare type Signal = any; +export declare type OctokitRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + */ + agent?: Agent; + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: Fetch; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: Signal; + /** + * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. + */ + timeout?: number; + [option: string]: any; +}; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 000000000..15711f02c --- /dev/null +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 000000000..bca6cd03b --- /dev/null +++ b/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { request, endpoint, Parameters } from "./types"; +export default function withDefaults(oldEndpoint: endpoint, newDefaults: Parameters): request; diff --git a/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 000000000..3d3ad18ba --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,126 @@ +import { endpoint } from '@octokit/endpoint'; +import getUserAgent from 'universal-user-agent'; +import isPlainObject from 'is-plain-object'; +import nodeFetch from 'node-fetch'; +import { RequestError } from '@octokit/request-error'; + +const VERSION = "0.0.0-development"; + +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 requsets + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + headers, + request: requestOptions + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + headers, + request: requestOptions + }); + } + if (status >= 400) { + return response + .text() + .then(message => { + const error = new RequestError(message, status, { + headers, + request: requestOptions + }); + try { + Object.assign(error, JSON.parse(error.message)); + } + 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) { + throw error; + } + throw new 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, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` + } +}); + +export { request }; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE new file mode 100644 index 000000000..3f2eca18f --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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/node_modules/@octokit/request/node_modules/is-plain-object/README.md b/node_modules/@octokit/request/node_modules/is-plain-object/README.md new file mode 100644 index 000000000..60b7b591f --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/README.md @@ -0,0 +1,119 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +```js +import isPlainObject from 'is-plain-object'; +``` + +**true** when created by the `Object` constructor. + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(null); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [TrySound](https://github.com/TrySound) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js new file mode 100644 index 000000000..d7dda9510 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js @@ -0,0 +1,48 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +module.exports = isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts new file mode 100644 index 000000000..fd131f01c --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts @@ -0,0 +1,3 @@ +declare function isPlainObject(o: any): boolean; + +export default isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.js new file mode 100644 index 000000000..565ce9e43 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/index.js @@ -0,0 +1,35 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +import isObject from 'isobject'; + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +export default function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/package.json b/node_modules/@octokit/request/node_modules/is-plain-object/package.json new file mode 100644 index 000000000..abeb901ec --- /dev/null +++ b/node_modules/@octokit/request/node_modules/is-plain-object/package.json @@ -0,0 +1,124 @@ +{ + "_from": "is-plain-object@^3.0.0", + "_id": "is-plain-object@3.0.0", + "_inBundle": false, + "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "_location": "/@octokit/request/is-plain-object", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-plain-object@^3.0.0", + "name": "is-plain-object", + "escapedName": "is-plain-object", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "_shasum": "47bfc5da1b5d50d64110806c199359482e75a928", + "_spec": "is-plain-object@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Osman Nuri Okumuş", + "url": "http://onokumus.com" + }, + { + "name": "Steven Vachon", + "url": "https://svachon.com" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "isobject": "^4.0.0" + }, + "deprecated": false, + "description": "Returns true if an object was created by the `Object` constructor.", + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^2.0.2", + "rollup": "^1.10.1", + "rollup-plugin-node-resolve": "^4.2.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.js", + "index.cjs.js" + ], + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "is-plain-object", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-plain-object.git" + }, + "scripts": { + "build": "rollup -c", + "prepare": "rollup -c", + "test": "npm run test_node && npm run build && npm run test_browser", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "3.0.0" +} diff --git a/node_modules/@octokit/request/node_modules/isobject/LICENSE b/node_modules/@octokit/request/node_modules/isobject/LICENSE new file mode 100644 index 000000000..943e71d05 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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. \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/README.md b/node_modules/@octokit/request/node_modules/isobject/README.md new file mode 100644 index 000000000..1c6e21fa0 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/README.md @@ -0,0 +1,127 @@ +# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) + +> Returns true if the value is an object and not an array or null. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save isobject +``` + +Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install isobject +``` + +## Usage + +```js +import isObject from 'isobject'; +``` + +**True** + +All of the following return `true`: + +```js +isObject({}); +isObject(Object.create({})); +isObject(Object.create(Object.prototype)); +isObject(Object.create(null)); +isObject({}); +isObject(new Foo); +isObject(/foo/); +``` + +**False** + +All of the following return `false`: + +```js +isObject(); +isObject(function () {}); +isObject(1); +isObject([]); +isObject(undefined); +isObject(null); +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 30 | [jonschlinkert](https://github.com/jonschlinkert) | +| 8 | [doowb](https://github.com/doowb) | +| 7 | [TrySound](https://github.com/TrySound) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [LeSuisse](https://github.com/LeSuisse) | +| 1 | [tmcw](https://github.com/tmcw) | +| 1 | [ZhouHansen](https://github.com/ZhouHansen) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/index.cjs.js b/node_modules/@octokit/request/node_modules/isobject/index.cjs.js new file mode 100644 index 000000000..49debe736 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.cjs.js @@ -0,0 +1,14 @@ +'use strict'; + +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +} + +module.exports = isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.d.ts b/node_modules/@octokit/request/node_modules/isobject/index.d.ts new file mode 100644 index 000000000..c471c7156 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.d.ts @@ -0,0 +1,3 @@ +declare function isObject(val: any): boolean; + +export default isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.js b/node_modules/@octokit/request/node_modules/isobject/index.js new file mode 100644 index 000000000..e9f038225 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/index.js @@ -0,0 +1,10 @@ +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +export default function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; diff --git a/node_modules/@octokit/request/node_modules/isobject/package.json b/node_modules/@octokit/request/node_modules/isobject/package.json new file mode 100644 index 000000000..259758094 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/isobject/package.json @@ -0,0 +1,125 @@ +{ + "_from": "isobject@^4.0.0", + "_id": "isobject@4.0.0", + "_inBundle": false, + "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "_location": "/@octokit/request/isobject", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isobject@^4.0.0", + "name": "isobject", + "escapedName": "isobject", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/@octokit/request/is-plain-object" + ], + "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "_shasum": "3f1c9155e73b192022a80819bacd0343711697b0", + "_spec": "isobject@^4.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request\\node_modules\\is-plain-object", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/isobject/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "url": "https://github.com/LeSuisse" + }, + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Magnús Dæhlen", + "url": "https://github.com/magnudae" + }, + { + "name": "Tom MacWright", + "url": "https://macwright.org" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Returns true if the value is an object and not an array or null.", + "devDependencies": { + "esm": "^3.2.22", + "gulp-format-md": "^0.1.9", + "mocha": "^2.4.5", + "rollup": "^1.10.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.d.ts", + "index.cjs.js", + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/isobject", + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "kind", + "kind-of", + "kindof", + "native", + "object", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.cjs.js", + "module": "index.js", + "name": "isobject", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/isobject.git" + }, + "scripts": { + "build": "rollup -i index.js -o index.cjs.js -f cjs", + "prepublish": "npm run build", + "test": "mocha -r esm" + }, + "types": "index.d.ts", + "verb": { + "related": { + "list": [ + "extend-shallow", + "is-plain-object", + "kind-of", + "merge-deep" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb" + ] + }, + "version": "4.0.0" +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/.travis.yml b/node_modules/@octokit/request/node_modules/universal-user-agent/.travis.yml new file mode 100644 index 000000000..ebafc54d6 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/.travis.yml @@ -0,0 +1,35 @@ +language: node_js +cache: npm + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +stages: + - test + - name: release + if: branch = master AND type IN (push) + +jobs: + include: + - stage: test + node_js: 12 + script: npm run test + - node_js: 8 + script: npm run test + - node_js: 10 + env: Node 10 & coverage upload + script: + - npm run test + - npm run coverage:upload + - node_js: lts/* + env: browser tests + script: npm run test:browser + + - stage: release + node_js: lts/* + env: semantic-release + script: npm run semantic-release diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 000000000..f105ab0c0 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/README.md b/node_modules/@octokit/request/node_modules/universal-user-agent/README.md new file mode 100644 index 000000000..59e809ed8 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const getUserAgent = require('universal-user-agent') +const userAgent = getUserAgent() + +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/browser.js b/node_modules/@octokit/request/node_modules/universal-user-agent/browser.js new file mode 100644 index 000000000..eb1274439 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/browser.js @@ -0,0 +1,6 @@ +module.exports = getUserAgentBrowser + +function getUserAgentBrowser () { + /* global navigator */ + return navigator.userAgent +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/cypress.json b/node_modules/@octokit/request/node_modules/universal-user-agent/cypress.json new file mode 100644 index 000000000..a1ff4b85e --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/cypress.json @@ -0,0 +1,4 @@ +{ + "integrationFolder": "test", + "video": false +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/index.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 000000000..04dfc0435 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1 @@ +export default function getUserAgentNode(): string; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/index.js new file mode 100644 index 000000000..ef2d06b28 --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/index.js @@ -0,0 +1,15 @@ +module.exports = getUserAgentNode + +const osName = require('os-name') + +function getUserAgentNode () { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return 'Windows ' + } + + throw error + } +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json new file mode 100644 index 000000000..fcc28543d --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json @@ -0,0 +1,82 @@ +{ + "_from": "universal-user-agent@^3.0.0", + "_id": "universal-user-agent@3.0.0", + "_inBundle": false, + "_integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "_location": "/@octokit/request/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "universal-user-agent@^3.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "_shasum": "4cc88d68097bffd7ac42e3b7c903e7481424b4b9", + "_spec": "universal-user-agent@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "os-name": "^3.0.0" + }, + "deprecated": false, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.2", + "cypress": "^3.1.0", + "mocha": "^6.0.0", + "nyc": "^14.0.0", + "proxyquire": "^2.1.0", + "semantic-release": "^15.9.15", + "sinon": "^7.2.4", + "sinon-chai": "^3.2.0", + "standard": "^13.0.1", + "test": "^0.6.0", + "travis-deploy-once": "^5.0.7" + }, + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "universal-user-agent", + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "scripts": { + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "nyc mocha \"test/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "travis-deploy-once": "travis-deploy-once" + }, + "standard": { + "globals": [ + "describe", + "it", + "beforeEach", + "afterEach", + "expect" + ] + }, + "types": "index.d.ts", + "version": "3.0.0" +} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/test/smoke-test.js b/node_modules/@octokit/request/node_modules/universal-user-agent/test/smoke-test.js new file mode 100644 index 000000000..d71b2d51c --- /dev/null +++ b/node_modules/@octokit/request/node_modules/universal-user-agent/test/smoke-test.js @@ -0,0 +1,57 @@ +// make tests run in both Node & Express +if (!global.cy) { + const chai = require('chai') + const sinon = require('sinon') + const sinonChai = require('sinon-chai') + chai.use(sinonChai) + global.expect = chai.expect + + let sandbox + beforeEach(() => { + sandbox = sinon.createSandbox() + global.cy = { + stub: function () { + return sandbox.stub.apply(sandbox, arguments) + }, + log () { + console.log.apply(console, arguments) + } + } + }) + + afterEach(() => { + sandbox.restore() + }) +} + +const getUserAgent = require('..') + +describe('smoke', () => { + it('works', () => { + expect(getUserAgent()).to.be.a('string') + expect(getUserAgent().length).to.be.above(10) + }) + + if (!process.browser) { // test on node only + const proxyquire = require('proxyquire').noCallThru() + it('works around wmic error on Windows (#5)', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('Command failed: wmic os get Caption') + } + }) + + expect(getUserAgent()).to.equal('Windows ') + }) + + it('does not swallow unexpected errors', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('oops') + } + }) + + expect(getUserAgent).to.throw('oops') + }) + } +}) diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json new file mode 100644 index 000000000..f82cad374 --- /dev/null +++ b/node_modules/@octokit/request/package.json @@ -0,0 +1,89 @@ +{ + "_from": "@octokit/request@^5.0.0", + "_id": "@octokit/request@5.0.2", + "_inBundle": false, + "_integrity": "sha512-z1BQr43g4kOL4ZrIVBMHwi68Yg9VbkRUyuAgqCp1rU3vbYa69+2gIld/+gHclw15bJWQnhqqyEb7h5a5EqgZ0A==", + "_location": "/@octokit/request", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@octokit/request@^5.0.0", + "name": "@octokit/request", + "escapedName": "@octokit%2frequest", + "scope": "@octokit", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/@octokit/graphql", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.0.2.tgz", + "_shasum": "59a920451f24811c016ddc507adcc41aafb2dca5", + "_spec": "@octokit/request@^5.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\graphql", + "bugs": { + "url": "https://github.com/octokit/request.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@octokit/endpoint": "^5.1.0", + "@octokit/request-error": "^1.0.1", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^3.0.0" + }, + "deprecated": false, + "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", + "devDependencies": { + "@pika/pack": "^0.4.0", + "@pika/plugin-build-node": "^0.5.1", + "@pika/plugin-build-web": "^0.5.1", + "@pika/plugin-ts-standard-pkg": "^0.5.1", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^24.0.12", + "@types/node": "^12.0.3", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^7.2.0", + "jest": "^24.7.1", + "prettier": "^1.17.0", + "semantic-release": "^15.10.5", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^24.0.2", + "typescript": "^3.4.5" + }, + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/octokit/request.js#readme", + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "license": "MIT", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "@octokit/request", + "pika": true, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/request.js.git" + }, + "sideEffects": false, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "version": "5.0.2" +} diff --git a/node_modules/@octokit/rest/LICENSE b/node_modules/@octokit/rest/LICENSE new file mode 100644 index 000000000..4c0d268a2 --- /dev/null +++ b/node_modules/@octokit/rest/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit 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/node_modules/@octokit/rest/README.md b/node_modules/@octokit/rest/README.md new file mode 100644 index 000000000..378def23f --- /dev/null +++ b/node_modules/@octokit/rest/README.md @@ -0,0 +1,44 @@ +# rest.js + +> GitHub REST API client for JavaScript + +[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) +[![Build Status](https://travis-ci.org/octokit/rest.js.svg?branch=master)](https://travis-ci.org/octokit/rest.js) +[![Coverage Status](https://coveralls.io/repos/github/octokit/rest.js/badge.svg)](https://coveralls.io/github/octokit/rest.js) +[![Greenkeeper](https://badges.greenkeeper.io/octokit/rest.js.svg)](https://greenkeeper.io/) + +## Installation +```shell +npm install @octokit/rest +``` + +## Usage + +```js +const Octokit = require('@octokit/rest') +const octokit = new Octokit() + +// Compare: https://developer.github.com/v3/repos/#list-organization-repositories +octokit.repos.listForOrg({ + org: 'octokit', + type: 'public' +}).then(({ data }) => { + // handle data +}) +``` + +See https://octokit.github.io/rest.js/ for full documentation. + +## Contributing + +We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. + +## Credits + +`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. + +It was adopted and renamed by GitHub in 2017 + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/rest/index.d.ts b/node_modules/@octokit/rest/index.d.ts new file mode 100644 index 000000000..f353a5317 --- /dev/null +++ b/node_modules/@octokit/rest/index.d.ts @@ -0,0 +1,32082 @@ +/** + * This declaration file requires TypeScript 3.1 or above. + */ + +/// + +import * as http from "http"; + +declare namespace Octokit { + type json = any; + type date = string; + + export interface Static { + plugin(plugin: Plugin): Static; + new (options?: Octokit.Options): Octokit; + } + + export interface Response { + /** This is the data you would see in https://developer.github.com/v3/ */ + data: T; + + /** Response status number */ + status: number; + + /** Response headers */ + headers: { + date: string; + "x-ratelimit-limit": string; + "x-ratelimit-remaining": string; + "x-ratelimit-reset": string; + "x-Octokit-request-id": string; + "x-Octokit-media-type": string; + link: string; + "last-modified": string; + etag: string; + status: string; + }; + + [Symbol.iterator](): Iterator; + } + + export type AnyResponse = Response; + + export interface EmptyParams {} + + export interface Options { + auth?: + | string + | { username: string; password: string; on2fa: () => Promise } + | { clientId: string; clientSecret: string } + | { (): string | Promise }; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug?: (message: string, info?: object) => void; + info?: (message: string, info?: object) => void; + warn?: (message: string, info?: object) => void; + error?: (message: string, info?: object) => void; + }; + request?: { + agent?: http.Agent; + timeout?: number; + }; + timeout?: number; // Deprecated + headers?: { [header: string]: any }; // Deprecated + agent?: http.Agent; // Deprecated + [option: string]: any; + } + + export type RequestMethod = + | "DELETE" + | "GET" + | "HEAD" + | "PATCH" + | "POST" + | "PUT"; + + export interface EndpointOptions { + baseUrl?: string; + method?: RequestMethod; + url?: string; + headers?: { [header: string]: any }; + data?: any; + request?: { [option: string]: any }; + [parameter: string]: any; + } + + export interface RequestOptions { + method?: RequestMethod; + url?: string; + headers?: { [header: string]: any }; + body?: any; + request?: { [option: string]: any }; + } + + export interface Log { + debug: (message: string, additionalInfo?: object) => void; + info: (message: string, additionalInfo?: object) => void; + warn: (message: string, additionalInfo?: object) => void; + error: (message: string, additionalInfo?: object) => void; + } + + export interface Endpoint { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + (EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Current default options + */ + DEFAULTS: Octokit.EndpointOptions; + /** + * Get the defaulted endpoint options, but without parsing them into request options: + */ + merge( + Route: string, + EndpointOptions?: Octokit.EndpointOptions + ): Octokit.RequestOptions; + merge(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Stateless method to turn endpoint options into request options. Calling endpoint(options) is the same as calling endpoint.parse(endpoint.merge(options)). + */ + parse(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; + /** + * Merges existing defaults with passed options and returns new endpoint() method with new defaults + */ + defaults(EndpointOptions: Octokit.EndpointOptions): Octokit.Endpoint; + } + + export interface Request { + (Route: string, EndpointOptions?: Octokit.EndpointOptions): Promise< + Octokit.AnyResponse + >; + (EndpointOptions: Octokit.EndpointOptions): Promise; + endpoint: Octokit.Endpoint; + } + + export interface AuthBasic { + type: "basic"; + username: string; + password: string; + } + + export interface AuthOAuthToken { + type: "oauth"; + token: string; + } + + export interface AuthOAuthSecret { + type: "oauth"; + key: string; + secret: string; + } + + export interface AuthUserToken { + type: "token"; + token: string; + } + + export interface AuthJWT { + type: "app"; + token: string; + } + + export type Link = { link: string } | { headers: { link: string } } | string; + + export interface Callback { + (error: Error | null, result: T): any; + } + + export type Plugin = (octokit: Octokit, options: Octokit.Options) => void; + + // See https://github.com/octokit/request.js#octokitrequest + export type HookOptions = { + baseUrl: string; + headers: { [header: string]: string }; + method: string; + url: string; + data: any; + // See https://github.com/bitinn/node-fetch#options + request: { + follow?: number; + timeout?: number; + compress?: boolean; + size?: number; + agent?: string | null; + }; + [index: string]: any; + }; + + export type HookError = Error & { + status: number; + headers: { [header: string]: string }; + documentation_url?: string; + errors?: [ + { + resource: string; + field: string; + code: string; + } + ]; + }; + + export interface Paginate { + ( + Route: string, + EndpointOptions?: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse) => any + ): Promise; + ( + EndpointOptions: Octokit.EndpointOptions, + callback?: (response: Octokit.AnyResponse) => any + ): Promise; + iterator: ( + EndpointOptions: Octokit.EndpointOptions + ) => AsyncIterableIterator; + } + + type UsersDeletePublicKeyResponse = {}; + type UsersCreatePublicKeyResponse = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type UsersGetPublicKeyResponse = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type UsersListPublicKeysResponseItem = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type UsersListPublicKeysForUserResponseItem = { id: number; key: string }; + type UsersDeleteGpgKeyResponse = {}; + type UsersCreateGpgKeyResponseSubkeysItem = { + id: number; + primary_key_id: number; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersCreateGpgKeyResponseEmailsItem = { + email: string; + verified: boolean; + }; + type UsersCreateGpgKeyResponse = { + id: number; + primary_key_id: null; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersGetGpgKeyResponseSubkeysItem = { + id: number; + primary_key_id: number; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersGetGpgKeyResponseEmailsItem = { email: string; verified: boolean }; + type UsersGetGpgKeyResponse = { + id: number; + primary_key_id: null; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersListGpgKeysResponseItemSubkeysItem = { + id: number; + primary_key_id: number; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersListGpgKeysResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysResponseItem = { + id: number; + primary_key_id: null; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersListGpgKeysForUserResponseItemSubkeysItem = { + id: number; + primary_key_id: number; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersListGpgKeysForUserResponseItemEmailsItem = { + email: string; + verified: boolean; + }; + type UsersListGpgKeysForUserResponseItem = { + id: number; + primary_key_id: null; + key_id: string; + public_key: string; + emails: Array; + subkeys: Array; + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + can_certify: boolean; + created_at: string; + expires_at: null; + }; + type UsersUnfollowResponse = {}; + type UsersFollowResponse = {}; + type UsersListFollowingForAuthenticatedUserResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersListFollowingForUserResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersListFollowersForAuthenticatedUserResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersListFollowersForUserResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersTogglePrimaryEmailVisibilityResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string; + }; + type UsersDeleteEmailsResponse = {}; + type UsersAddEmailsResponseItem = { + email: string; + primary: boolean; + verified: boolean; + visibility: string | null; + }; + type UsersListPublicEmailsResponseItem = { + email: string; + verified: boolean; + primary: boolean; + visibility: string; + }; + type UsersListEmailsResponseItem = { + email: string; + verified: boolean; + primary: boolean; + visibility: string; + }; + type UsersUnblockResponse = {}; + type UsersBlockResponse = {}; + type UsersCheckBlockedResponse = {}; + type UsersListBlockedResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersListResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type UsersUpdateAuthenticatedResponsePlan = { + name: string; + space: number; + private_repos: number; + collaborators: number; + }; + type UsersUpdateAuthenticatedResponse = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + name: string; + company: string; + blog: string; + location: string; + email: string; + hireable: boolean; + bio: string; + public_repos: number; + public_gists: number; + followers: number; + following: number; + created_at: string; + updated_at: string; + private_gists: number; + total_private_repos: number; + owned_private_repos: number; + disk_usage: number; + collaborators: number; + two_factor_authentication: boolean; + plan: UsersUpdateAuthenticatedResponsePlan; + }; + type UsersGetByUsernameResponse = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + name: string; + company: string; + blog: string; + location: string; + email: string; + hireable: boolean; + bio: string; + public_repos: number; + public_gists: number; + followers: number; + following: number; + created_at: string; + updated_at: string; + }; + type TeamsListPendingInvitationsResponseItemInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsListPendingInvitationsResponseItem = { + id: number; + login: string; + email: string; + role: string; + created_at: string; + inviter: TeamsListPendingInvitationsResponseItemInviter; + team_count: number; + invitation_team_url: string; + }; + type TeamsRemoveMembershipResponse = {}; + type TeamsRemoveMemberResponse = {}; + type TeamsAddMemberResponse = {}; + type TeamsListMembersResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsDeleteDiscussionResponse = {}; + type TeamsUpdateDiscussionResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsUpdateDiscussionResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsUpdateDiscussionResponse = { + author: TeamsUpdateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + last_edited_at: string; + html_url: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + team_url: string; + title: string; + updated_at: string; + url: string; + reactions: TeamsUpdateDiscussionResponseReactions; + }; + type TeamsCreateDiscussionResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsCreateDiscussionResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsCreateDiscussionResponse = { + author: TeamsCreateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + last_edited_at: null; + html_url: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + team_url: string; + title: string; + updated_at: string; + url: string; + reactions: TeamsCreateDiscussionResponseReactions; + }; + type TeamsGetDiscussionResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsGetDiscussionResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsGetDiscussionResponse = { + author: TeamsGetDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + last_edited_at: null; + html_url: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + team_url: string; + title: string; + updated_at: string; + url: string; + reactions: TeamsGetDiscussionResponseReactions; + }; + type TeamsListDiscussionsResponseItemReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsListDiscussionsResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsListDiscussionsResponseItem = { + author: TeamsListDiscussionsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + last_edited_at: null; + html_url: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + team_url: string; + title: string; + updated_at: string; + url: string; + reactions: TeamsListDiscussionsResponseItemReactions; + }; + type TeamsDeleteDiscussionCommentResponse = {}; + type TeamsUpdateDiscussionCommentResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsUpdateDiscussionCommentResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsUpdateDiscussionCommentResponse = { + author: TeamsUpdateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + last_edited_at: string; + discussion_url: string; + html_url: string; + node_id: string; + number: number; + updated_at: string; + url: string; + reactions: TeamsUpdateDiscussionCommentResponseReactions; + }; + type TeamsCreateDiscussionCommentResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsCreateDiscussionCommentResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsCreateDiscussionCommentResponse = { + author: TeamsCreateDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + last_edited_at: null; + discussion_url: string; + html_url: string; + node_id: string; + number: number; + updated_at: string; + url: string; + reactions: TeamsCreateDiscussionCommentResponseReactions; + }; + type TeamsGetDiscussionCommentResponseReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsGetDiscussionCommentResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsGetDiscussionCommentResponse = { + author: TeamsGetDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + last_edited_at: null; + discussion_url: string; + html_url: string; + node_id: string; + number: number; + updated_at: string; + url: string; + reactions: TeamsGetDiscussionCommentResponseReactions; + }; + type TeamsListDiscussionCommentsResponseItemReactions = { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + }; + type TeamsListDiscussionCommentsResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsListDiscussionCommentsResponseItem = { + author: TeamsListDiscussionCommentsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + last_edited_at: null; + discussion_url: string; + html_url: string; + node_id: string; + number: number; + updated_at: string; + url: string; + reactions: TeamsListDiscussionCommentsResponseItemReactions; + }; + type TeamsRemoveProjectResponse = {}; + type TeamsAddOrUpdateProjectResponse = {}; + type TeamsReviewProjectResponsePermissions = { + read: boolean; + write: boolean; + admin: boolean; + }; + type TeamsReviewProjectResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsReviewProjectResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: TeamsReviewProjectResponseCreator; + created_at: string; + updated_at: string; + organization_permission: string; + private: boolean; + permissions: TeamsReviewProjectResponsePermissions; + }; + type TeamsListProjectsResponseItemPermissions = { + read: boolean; + write: boolean; + admin: boolean; + }; + type TeamsListProjectsResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsListProjectsResponseItem = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: TeamsListProjectsResponseItemCreator; + created_at: string; + updated_at: string; + organization_permission: string; + private: boolean; + permissions: TeamsListProjectsResponseItemPermissions; + }; + type TeamsListForAuthenticatedUserResponseItemOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + }; + type TeamsListForAuthenticatedUserResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: TeamsListForAuthenticatedUserResponseItemOrganization; + }; + type TeamsRemoveRepoResponse = {}; + type TeamsAddOrUpdateRepoResponse = {}; + type TeamsListReposResponseItemLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type TeamsListReposResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type TeamsListReposResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type TeamsListReposResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: TeamsListReposResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: TeamsListReposResponseItemPermissions; + template_repository: null; + subscribers_count: number; + network_count: number; + license: TeamsListReposResponseItemLicense; + }; + type TeamsDeleteResponse = {}; + type TeamsUpdateResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + }; + type TeamsUpdateResponse = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: TeamsUpdateResponseOrganization; + }; + type TeamsCreateResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + }; + type TeamsCreateResponse = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: TeamsCreateResponseOrganization; + }; + type TeamsGetByNameResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + }; + type TeamsGetByNameResponse = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: TeamsGetByNameResponseOrganization; + }; + type TeamsGetResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + }; + type TeamsGetResponse = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + members_count: number; + repos_count: number; + created_at: string; + updated_at: string; + organization: TeamsGetResponseOrganization; + }; + type TeamsListResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposGetClonesResponseClonesItem = { + timestamp: string; + count: number; + uniques: number; + }; + type ReposGetClonesResponse = { + count: number; + uniques: number; + clones: Array; + }; + type ReposGetViewsResponseViewsItem = { + timestamp: string; + count: number; + uniques: number; + }; + type ReposGetViewsResponse = { + count: number; + uniques: number; + views: Array; + }; + type ReposGetTopPathsResponseItem = { + path: string; + title: string; + count: number; + uniques: number; + }; + type ReposGetTopReferrersResponseItem = { + referrer: string; + count: number; + uniques: number; + }; + type ReposGetCombinedStatusForRefResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetCombinedStatusForRefResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ReposGetCombinedStatusForRefResponseStatusesItem = { + url: string; + avatar_url: string; + id: number; + node_id: string; + state: string; + description: string; + target_url: string; + context: string; + created_at: string; + updated_at: string; + }; + type ReposGetCombinedStatusForRefResponse = { + state: string; + statuses: Array; + sha: string; + total_count: number; + repository: ReposGetCombinedStatusForRefResponseRepository; + commit_url: string; + url: string; + }; + type ReposListStatusesForRefResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListStatusesForRefResponseItem = { + url: string; + avatar_url: string; + id: number; + node_id: string; + state: string; + description: string; + target_url: string; + context: string; + created_at: string; + updated_at: string; + creator: ReposListStatusesForRefResponseItemCreator; + }; + type ReposCreateStatusResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateStatusResponse = { + url: string; + avatar_url: string; + id: number; + node_id: string; + state: string; + description: string; + target_url: string; + context: string; + created_at: string; + updated_at: string; + creator: ReposCreateStatusResponseCreator; + }; + type ReposGetParticipationStatsResponse = { + all: Array; + owner: Array; + }; + type ReposGetCommitActivityStatsResponseItem = { + days: Array; + total: number; + week: number; + }; + type ReposGetContributorsStatsResponseItemWeeksItem = { + w: string; + a: number; + d: number; + c: number; + }; + type ReposGetContributorsStatsResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetContributorsStatsResponseItem = { + author: ReposGetContributorsStatsResponseItemAuthor; + total: number; + weeks: Array; + }; + type ReposDeleteReleaseAssetResponse = {}; + type ReposUpdateReleaseAssetResponseUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateReleaseAssetResponse = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposUpdateReleaseAssetResponseUploader; + }; + type ReposGetReleaseAssetResponseUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetReleaseAssetResponse = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposGetReleaseAssetResponseUploader; + }; + type ReposListAssetsForReleaseResponseItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListAssetsForReleaseResponseItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposListAssetsForReleaseResponseItemUploader; + }; + type ReposDeleteReleaseResponse = {}; + type ReposUpdateReleaseResponseAssetsItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateReleaseResponseAssetsItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposUpdateReleaseResponseAssetsItemUploader; + }; + type ReposUpdateReleaseResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateReleaseResponse = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposUpdateReleaseResponseAuthor; + assets: Array; + }; + type ReposCreateReleaseResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateReleaseResponse = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposCreateReleaseResponseAuthor; + assets: Array; + }; + type ReposGetReleaseByTagResponseAssetsItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetReleaseByTagResponseAssetsItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposGetReleaseByTagResponseAssetsItemUploader; + }; + type ReposGetReleaseByTagResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetReleaseByTagResponse = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposGetReleaseByTagResponseAuthor; + assets: Array; + }; + type ReposGetLatestReleaseResponseAssetsItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetLatestReleaseResponseAssetsItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposGetLatestReleaseResponseAssetsItemUploader; + }; + type ReposGetLatestReleaseResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetLatestReleaseResponse = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposGetLatestReleaseResponseAuthor; + assets: Array; + }; + type ReposGetReleaseResponseAssetsItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetReleaseResponseAssetsItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposGetReleaseResponseAssetsItemUploader; + }; + type ReposGetReleaseResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetReleaseResponse = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposGetReleaseResponseAuthor; + assets: Array; + }; + type ReposListReleasesResponseItemAssetsItemUploader = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListReleasesResponseItemAssetsItem = { + url: string; + browser_download_url: string; + id: number; + node_id: string; + name: string; + label: string; + state: string; + content_type: string; + size: number; + download_count: number; + created_at: string; + updated_at: string; + uploader: ReposListReleasesResponseItemAssetsItemUploader; + }; + type ReposListReleasesResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListReleasesResponseItem = { + url: string; + html_url: string; + assets_url: string; + upload_url: string; + tarball_url: string; + zipball_url: string; + id: number; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + body: string; + draft: boolean; + prerelease: boolean; + created_at: string; + published_at: string; + author: ReposListReleasesResponseItemAuthor; + assets: Array; + }; + type ReposGetPagesBuildResponsePusher = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetPagesBuildResponseError = { message: null }; + type ReposGetPagesBuildResponse = { + url: string; + status: string; + error: ReposGetPagesBuildResponseError; + pusher: ReposGetPagesBuildResponsePusher; + commit: string; + duration: number; + created_at: string; + updated_at: string; + }; + type ReposGetLatestPagesBuildResponsePusher = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetLatestPagesBuildResponseError = { message: null }; + type ReposGetLatestPagesBuildResponse = { + url: string; + status: string; + error: ReposGetLatestPagesBuildResponseError; + pusher: ReposGetLatestPagesBuildResponsePusher; + commit: string; + duration: number; + created_at: string; + updated_at: string; + }; + type ReposListPagesBuildsResponseItemPusher = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPagesBuildsResponseItemError = { message: null }; + type ReposListPagesBuildsResponseItem = { + url: string; + status: string; + error: ReposListPagesBuildsResponseItemError; + pusher: ReposListPagesBuildsResponseItemPusher; + commit: string; + duration: number; + created_at: string; + updated_at: string; + }; + type ReposRequestPageBuildResponse = { url: string; status: string }; + type ReposUpdateInformationAboutPagesSiteResponse = {}; + type ReposDisablePagesSiteResponse = {}; + type ReposEnablePagesSiteResponseSource = { + branch: string; + directory: string; + }; + type ReposEnablePagesSiteResponse = { + url: string; + status: string; + cname: string; + custom_404: boolean; + html_url: string; + source: ReposEnablePagesSiteResponseSource; + }; + type ReposGetPagesResponseSource = { branch: string; directory: string }; + type ReposGetPagesResponse = { + url: string; + status: string; + cname: string; + custom_404: boolean; + html_url: string; + source: ReposGetPagesResponseSource; + }; + type ReposRemoveDeployKeyResponse = {}; + type ReposAddDeployKeyResponse = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type ReposGetDeployKeyResponse = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type ReposListDeployKeysResponseItem = { + id: number; + key: string; + url: string; + title: string; + verified: boolean; + created_at: string; + read_only: boolean; + }; + type ReposDeclineInvitationResponse = {}; + type ReposAcceptInvitationResponse = {}; + type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ReposListInvitationsForAuthenticatedUserResponseItem = { + id: number; + repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; + invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; + inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; + permissions: string; + created_at: string; + url: string; + html_url: string; + }; + type ReposUpdateInvitationResponseInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateInvitationResponseInvitee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateInvitationResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateInvitationResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposUpdateInvitationResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ReposUpdateInvitationResponse = { + id: number; + repository: ReposUpdateInvitationResponseRepository; + invitee: ReposUpdateInvitationResponseInvitee; + inviter: ReposUpdateInvitationResponseInviter; + permissions: string; + created_at: string; + url: string; + html_url: string; + }; + type ReposDeleteInvitationResponse = {}; + type ReposListInvitationsResponseItemInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsResponseItemInvitee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListInvitationsResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListInvitationsResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ReposListInvitationsResponseItem = { + id: number; + repository: ReposListInvitationsResponseItemRepository; + invitee: ReposListInvitationsResponseItemInvitee; + inviter: ReposListInvitationsResponseItemInviter; + permissions: string; + created_at: string; + url: string; + html_url: string; + }; + type ReposDeleteHookResponse = {}; + type ReposPingHookResponse = {}; + type ReposTestPushHookResponse = {}; + type ReposUpdateHookResponseLastResponse = { + code: null; + status: string; + message: null; + }; + type ReposUpdateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposUpdateHookResponse = { + type: string; + id: number; + name: string; + active: boolean; + events: Array; + config: ReposUpdateHookResponseConfig; + updated_at: string; + created_at: string; + url: string; + test_url: string; + ping_url: string; + last_response: ReposUpdateHookResponseLastResponse; + }; + type ReposCreateHookResponseLastResponse = { + code: null; + status: string; + message: null; + }; + type ReposCreateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposCreateHookResponse = { + type: string; + id: number; + name: string; + active: boolean; + events: Array; + config: ReposCreateHookResponseConfig; + updated_at: string; + created_at: string; + url: string; + test_url: string; + ping_url: string; + last_response: ReposCreateHookResponseLastResponse; + }; + type ReposGetHookResponseLastResponse = { + code: null; + status: string; + message: null; + }; + type ReposGetHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposGetHookResponse = { + type: string; + id: number; + name: string; + active: boolean; + events: Array; + config: ReposGetHookResponseConfig; + updated_at: string; + created_at: string; + url: string; + test_url: string; + ping_url: string; + last_response: ReposGetHookResponseLastResponse; + }; + type ReposListHooksResponseItemLastResponse = { + code: null; + status: string; + message: null; + }; + type ReposListHooksResponseItemConfig = { + content_type: string; + insecure_ssl: string; + url: string; + }; + type ReposListHooksResponseItem = { + type: string; + id: number; + name: string; + active: boolean; + events: Array; + config: ReposListHooksResponseItemConfig; + updated_at: string; + created_at: string; + url: string; + test_url: string; + ping_url: string; + last_response: ReposListHooksResponseItemLastResponse; + }; + type ReposCreateForkResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposCreateForkResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateForkResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposCreateForkResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposCreateForkResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposListForksResponseItemLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type ReposListForksResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposListForksResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListForksResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListForksResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposListForksResponseItemPermissions; + template_repository: null; + subscribers_count: number; + network_count: number; + license: ReposListForksResponseItemLicense; + }; + type ReposDeleteDownloadResponse = {}; + type ReposGetDownloadResponse = { + url: string; + html_url: string; + id: number; + name: string; + description: string; + size: number; + download_count: number; + content_type: string; + }; + type ReposListDownloadsResponseItem = { + url: string; + html_url: string; + id: number; + name: string; + description: string; + size: number; + download_count: number; + content_type: string; + }; + type ReposCreateDeploymentStatusResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateDeploymentStatusResponse = { + url: string; + id: number; + node_id: string; + state: string; + creator: ReposCreateDeploymentStatusResponseCreator; + description: string; + environment: string; + target_url: string; + created_at: string; + updated_at: string; + deployment_url: string; + repository_url: string; + environment_url: string; + log_url: string; + }; + type ReposGetDeploymentStatusResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetDeploymentStatusResponse = { + url: string; + id: number; + node_id: string; + state: string; + creator: ReposGetDeploymentStatusResponseCreator; + description: string; + environment: string; + target_url: string; + created_at: string; + updated_at: string; + deployment_url: string; + repository_url: string; + environment_url: string; + log_url: string; + }; + type ReposListDeploymentStatusesResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListDeploymentStatusesResponseItem = { + url: string; + id: number; + node_id: string; + state: string; + creator: ReposListDeploymentStatusesResponseItemCreator; + description: string; + environment: string; + target_url: string; + created_at: string; + updated_at: string; + deployment_url: string; + repository_url: string; + environment_url: string; + log_url: string; + }; + type ReposGetDeploymentResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetDeploymentResponsePayload = { deploy: string }; + type ReposGetDeploymentResponse = { + url: string; + id: number; + node_id: string; + sha: string; + ref: string; + task: string; + payload: ReposGetDeploymentResponsePayload; + original_environment: string; + environment: string; + description: string; + creator: ReposGetDeploymentResponseCreator; + created_at: string; + updated_at: string; + statuses_url: string; + repository_url: string; + transient_environment: boolean; + production_environment: boolean; + }; + type ReposListDeploymentsResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListDeploymentsResponseItemPayload = { deploy: string }; + type ReposListDeploymentsResponseItem = { + url: string; + id: number; + node_id: string; + sha: string; + ref: string; + task: string; + payload: ReposListDeploymentsResponseItemPayload; + original_environment: string; + environment: string; + description: string; + creator: ReposListDeploymentsResponseItemCreator; + created_at: string; + updated_at: string; + statuses_url: string; + repository_url: string; + transient_environment: boolean; + production_environment: boolean; + }; + type ReposGetArchiveLinkResponse = {}; + type ReposDeleteFileResponseCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposDeleteFileResponseCommitParentsItem = { + url: string; + html_url: string; + sha: string; + }; + type ReposDeleteFileResponseCommitTree = { url: string; sha: string }; + type ReposDeleteFileResponseCommitCommitter = { + date: string; + name: string; + email: string; + }; + type ReposDeleteFileResponseCommitAuthor = { + date: string; + name: string; + email: string; + }; + type ReposDeleteFileResponseCommit = { + sha: string; + node_id: string; + url: string; + html_url: string; + author: ReposDeleteFileResponseCommitAuthor; + committer: ReposDeleteFileResponseCommitCommitter; + message: string; + tree: ReposDeleteFileResponseCommitTree; + parents: Array; + verification: ReposDeleteFileResponseCommitVerification; + }; + type ReposDeleteFileResponse = { + content: null; + commit: ReposDeleteFileResponseCommit; + }; + type ReposUpdateFileResponseCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposUpdateFileResponseCommitParentsItem = { + url: string; + html_url: string; + sha: string; + }; + type ReposUpdateFileResponseCommitTree = { url: string; sha: string }; + type ReposUpdateFileResponseCommitCommitter = { + date: string; + name: string; + email: string; + }; + type ReposUpdateFileResponseCommitAuthor = { + date: string; + name: string; + email: string; + }; + type ReposUpdateFileResponseCommit = { + sha: string; + node_id: string; + url: string; + html_url: string; + author: ReposUpdateFileResponseCommitAuthor; + committer: ReposUpdateFileResponseCommitCommitter; + message: string; + tree: ReposUpdateFileResponseCommitTree; + parents: Array; + verification: ReposUpdateFileResponseCommitVerification; + }; + type ReposUpdateFileResponseContentLinks = { + self: string; + git: string; + html: string; + }; + type ReposUpdateFileResponseContent = { + name: string; + path: string; + sha: string; + size: number; + url: string; + html_url: string; + git_url: string; + download_url: string; + type: string; + _links: ReposUpdateFileResponseContentLinks; + }; + type ReposUpdateFileResponse = { + content: ReposUpdateFileResponseContent; + commit: ReposUpdateFileResponseCommit; + }; + type ReposCreateFileResponseCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposCreateFileResponseCommitParentsItem = { + url: string; + html_url: string; + sha: string; + }; + type ReposCreateFileResponseCommitTree = { url: string; sha: string }; + type ReposCreateFileResponseCommitCommitter = { + date: string; + name: string; + email: string; + }; + type ReposCreateFileResponseCommitAuthor = { + date: string; + name: string; + email: string; + }; + type ReposCreateFileResponseCommit = { + sha: string; + node_id: string; + url: string; + html_url: string; + author: ReposCreateFileResponseCommitAuthor; + committer: ReposCreateFileResponseCommitCommitter; + message: string; + tree: ReposCreateFileResponseCommitTree; + parents: Array; + verification: ReposCreateFileResponseCommitVerification; + }; + type ReposCreateFileResponseContentLinks = { + self: string; + git: string; + html: string; + }; + type ReposCreateFileResponseContent = { + name: string; + path: string; + sha: string; + size: number; + url: string; + html_url: string; + git_url: string; + download_url: string; + type: string; + _links: ReposCreateFileResponseContentLinks; + }; + type ReposCreateFileResponse = { + content: ReposCreateFileResponseContent; + commit: ReposCreateFileResponseCommit; + }; + type ReposCreateOrUpdateFileResponseCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposCreateOrUpdateFileResponseCommitParentsItem = { + url: string; + html_url: string; + sha: string; + }; + type ReposCreateOrUpdateFileResponseCommitTree = { url: string; sha: string }; + type ReposCreateOrUpdateFileResponseCommitCommitter = { + date: string; + name: string; + email: string; + }; + type ReposCreateOrUpdateFileResponseCommitAuthor = { + date: string; + name: string; + email: string; + }; + type ReposCreateOrUpdateFileResponseCommit = { + sha: string; + node_id: string; + url: string; + html_url: string; + author: ReposCreateOrUpdateFileResponseCommitAuthor; + committer: ReposCreateOrUpdateFileResponseCommitCommitter; + message: string; + tree: ReposCreateOrUpdateFileResponseCommitTree; + parents: Array; + verification: ReposCreateOrUpdateFileResponseCommitVerification; + }; + type ReposCreateOrUpdateFileResponseContentLinks = { + self: string; + git: string; + html: string; + }; + type ReposCreateOrUpdateFileResponseContent = { + name: string; + path: string; + sha: string; + size: number; + url: string; + html_url: string; + git_url: string; + download_url: string; + type: string; + _links: ReposCreateOrUpdateFileResponseContentLinks; + }; + type ReposCreateOrUpdateFileResponse = { + content: ReposCreateOrUpdateFileResponseContent; + commit: ReposCreateOrUpdateFileResponseCommit; + }; + type ReposGetReadmeResponseLinks = { + git: string; + self: string; + html: string; + }; + type ReposGetReadmeResponse = { + type: string; + encoding: string; + size: number; + name: string; + path: string; + content: string; + sha: string; + url: string; + git_url: string; + html_url: string; + download_url: string; + _links: ReposGetReadmeResponseLinks; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { + name: string; + key: string; + spdx_id: string; + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { + name: string; + key: string; + url: string; + html_url: string; + }; + type ReposRetrieveCommunityProfileMetricsResponseFiles = { + code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; + contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; + issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; + pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; + license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; + readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; + }; + type ReposRetrieveCommunityProfileMetricsResponse = { + health_percentage: number; + description: string; + documentation: boolean; + files: ReposRetrieveCommunityProfileMetricsResponseFiles; + updated_at: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { + href: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { + self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; + html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; + issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; + comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; + review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; + review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; + commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; + statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { + label: string; + ref: string; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { + label: string; + ref: string; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPullRequestsAssociatedWithCommitResponseItem = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; + body: string; + labels: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem + >; + milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; + assignees: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem + >; + requested_reviewers: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem + >; + requested_teams: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem + >; + head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; + base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; + _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; + author_association: string; + draft: boolean; + }; + type ReposListBranchesForHeadCommitResponseItemCommit = { + sha: string; + url: string; + }; + type ReposListBranchesForHeadCommitResponseItem = { + name: string; + commit: ReposListBranchesForHeadCommitResponseItemCommit; + protected: string; + }; + type ReposGetCommitRefShaResponse = {}; + type ReposGetCommitResponseFilesItem = { + filename: string; + additions: number; + deletions: number; + changes: number; + status: string; + raw_url: string; + blob_url: string; + patch: string; + }; + type ReposGetCommitResponseStats = { + additions: number; + deletions: number; + total: number; + }; + type ReposGetCommitResponseParentsItem = { url: string; sha: string }; + type ReposGetCommitResponseCommitter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetCommitResponseAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetCommitResponseCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposGetCommitResponseCommitTree = { url: string; sha: string }; + type ReposGetCommitResponseCommitCommitter = { + name: string; + email: string; + date: string; + }; + type ReposGetCommitResponseCommitAuthor = { + name: string; + email: string; + date: string; + }; + type ReposGetCommitResponseCommit = { + url: string; + author: ReposGetCommitResponseCommitAuthor; + committer: ReposGetCommitResponseCommitCommitter; + message: string; + tree: ReposGetCommitResponseCommitTree; + comment_count: number; + verification: ReposGetCommitResponseCommitVerification; + }; + type ReposGetCommitResponse = { + url: string; + sha: string; + node_id: string; + html_url: string; + comments_url: string; + commit: ReposGetCommitResponseCommit; + author: ReposGetCommitResponseAuthor; + committer: ReposGetCommitResponseCommitter; + parents: Array; + stats: ReposGetCommitResponseStats; + files: Array; + }; + type ReposListCommitsResponseItemParentsItem = { url: string; sha: string }; + type ReposListCommitsResponseItemCommitter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListCommitsResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListCommitsResponseItemCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposListCommitsResponseItemCommitTree = { url: string; sha: string }; + type ReposListCommitsResponseItemCommitCommitter = { + name: string; + email: string; + date: string; + }; + type ReposListCommitsResponseItemCommitAuthor = { + name: string; + email: string; + date: string; + }; + type ReposListCommitsResponseItemCommit = { + url: string; + author: ReposListCommitsResponseItemCommitAuthor; + committer: ReposListCommitsResponseItemCommitCommitter; + message: string; + tree: ReposListCommitsResponseItemCommitTree; + comment_count: number; + verification: ReposListCommitsResponseItemCommitVerification; + }; + type ReposListCommitsResponseItem = { + url: string; + sha: string; + node_id: string; + html_url: string; + comments_url: string; + commit: ReposListCommitsResponseItemCommit; + author: ReposListCommitsResponseItemAuthor; + committer: ReposListCommitsResponseItemCommitter; + parents: Array; + }; + type ReposDeleteCommitCommentResponse = {}; + type ReposUpdateCommitCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateCommitCommentResponse = { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string; + position: number; + line: number; + commit_id: string; + user: ReposUpdateCommitCommentResponseUser; + created_at: string; + updated_at: string; + }; + type ReposGetCommitCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetCommitCommentResponse = { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string; + position: number; + line: number; + commit_id: string; + user: ReposGetCommitCommentResponseUser; + created_at: string; + updated_at: string; + }; + type ReposCreateCommitCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateCommitCommentResponse = { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string; + position: number; + line: number; + commit_id: string; + user: ReposCreateCommitCommentResponseUser; + created_at: string; + updated_at: string; + }; + type ReposListCommentsForCommitResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListCommentsForCommitResponseItem = { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string; + position: number; + line: number; + commit_id: string; + user: ReposListCommentsForCommitResponseItemUser; + created_at: string; + updated_at: string; + }; + type ReposListCommitCommentsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListCommitCommentsResponseItem = { + html_url: string; + url: string; + id: number; + node_id: string; + body: string; + path: string; + position: number; + line: number; + commit_id: string; + user: ReposListCommitCommentsResponseItemUser; + created_at: string; + updated_at: string; + }; + type ReposRemoveCollaboratorResponse = {}; + type ReposListCollaboratorsResponseItemPermissions = { + pull: boolean; + push: boolean; + admin: boolean; + }; + type ReposListCollaboratorsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + permissions: ReposListCollaboratorsResponseItemPermissions; + }; + type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposAddProtectedBranchUserRestrictionsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposAddProtectedBranchTeamRestrictionsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposAddProtectedBranchAdminEnforcementResponse = { + url: string; + enabled: boolean; + }; + type ReposAddProtectedBranchRequiredSignaturesResponse = { + url: string; + enabled: boolean; + }; + type ReposGetProtectedBranchRequiredSignaturesResponse = { + url: string; + enabled: boolean; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + url: string; + users_url: string; + teams_url: string; + users: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + teams: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + }; + type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { + url: string; + dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + dismiss_stale_reviews: boolean; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + }; + type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { + url: string; + strict: boolean; + contexts: Array; + contexts_url: string; + }; + type ReposGetProtectedBranchRequiredStatusChecksResponse = { + url: string; + strict: boolean; + contexts: Array; + contexts_url: string; + }; + type ReposRemoveBranchProtectionResponse = {}; + type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateBranchProtectionResponseRestrictions = { + url: string; + users_url: string; + teams_url: string; + users: Array; + teams: Array; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + url: string; + users_url: string; + teams_url: string; + users: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + teams: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + }; + type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { + url: string; + dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + dismiss_stale_reviews: boolean; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + }; + type ReposUpdateBranchProtectionResponseEnforceAdmins = { + url: string; + enabled: boolean; + }; + type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { + url: string; + strict: boolean; + contexts: Array; + contexts_url: string; + }; + type ReposUpdateBranchProtectionResponse = { + url: string; + required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; + enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; + required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; + restrictions: ReposUpdateBranchProtectionResponseRestrictions; + }; + type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposGetBranchProtectionResponseRestrictionsUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetBranchProtectionResponseRestrictions = { + url: string; + users_url: string; + teams_url: string; + users: Array; + teams: Array; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + url: string; + users_url: string; + teams_url: string; + users: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + teams: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + }; + type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { + url: string; + dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + dismiss_stale_reviews: boolean; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + }; + type ReposGetBranchProtectionResponseEnforceAdmins = { + url: string; + enabled: boolean; + }; + type ReposGetBranchProtectionResponseRequiredStatusChecks = { + url: string; + strict: boolean; + contexts: Array; + contexts_url: string; + }; + type ReposGetBranchProtectionResponse = { + url: string; + required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; + enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; + required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; + restrictions: ReposGetBranchProtectionResponseRestrictions; + }; + type ReposGetBranchResponseProtectionRequiredStatusChecks = { + enforcement_level: string; + contexts: Array; + }; + type ReposGetBranchResponseProtection = { + enabled: boolean; + required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; + }; + type ReposGetBranchResponseLinks = { html: string; self: string }; + type ReposGetBranchResponseCommitCommitter = { + gravatar_id: string; + avatar_url: string; + url: string; + id: number; + login: string; + }; + type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; + type ReposGetBranchResponseCommitAuthor = { + gravatar_id: string; + avatar_url: string; + url: string; + id: number; + login: string; + }; + type ReposGetBranchResponseCommitCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type ReposGetBranchResponseCommitCommitCommitter = { + name: string; + date: string; + email: string; + }; + type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; + type ReposGetBranchResponseCommitCommitAuthor = { + name: string; + date: string; + email: string; + }; + type ReposGetBranchResponseCommitCommit = { + author: ReposGetBranchResponseCommitCommitAuthor; + url: string; + message: string; + tree: ReposGetBranchResponseCommitCommitTree; + committer: ReposGetBranchResponseCommitCommitCommitter; + verification: ReposGetBranchResponseCommitCommitVerification; + }; + type ReposGetBranchResponseCommit = { + sha: string; + node_id: string; + commit: ReposGetBranchResponseCommitCommit; + author: ReposGetBranchResponseCommitAuthor; + parents: Array; + url: string; + committer: ReposGetBranchResponseCommitCommitter; + }; + type ReposGetBranchResponse = { + name: string; + commit: ReposGetBranchResponseCommit; + _links: ReposGetBranchResponseLinks; + protected: boolean; + protection: ReposGetBranchResponseProtection; + protection_url: string; + }; + type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { + enforcement_level: string; + contexts: Array; + }; + type ReposListBranchesResponseItemProtection = { + enabled: boolean; + required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; + }; + type ReposListBranchesResponseItemCommit = { sha: string; url: string }; + type ReposListBranchesResponseItem = { + name: string; + commit: ReposListBranchesResponseItemCommit; + protected: boolean; + protection: ReposListBranchesResponseItemProtection; + protection_url: string; + }; + type ReposTransferResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposTransferResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposTransferResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposTransferResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposTransferResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposDeleteResponse = { message?: string; documentation_url?: string }; + type ReposListTagsResponseItemCommit = { sha: string; url: string }; + type ReposListTagsResponseItem = { + name: string; + commit: ReposListTagsResponseItemCommit; + zipball_url: string; + tarball_url: string; + }; + type ReposListTeamsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type ReposListLanguagesResponse = { C: number; Python: number }; + type ReposDisableAutomatedSecurityFixesResponse = {}; + type ReposEnableAutomatedSecurityFixesResponse = {}; + type ReposDisableVulnerabilityAlertsResponse = {}; + type ReposEnableVulnerabilityAlertsResponse = {}; + type ReposReplaceTopicsResponse = { names: Array }; + type ReposListTopicsResponse = { names: Array }; + type ReposUpdateResponseSourcePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposUpdateResponseSourceOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateResponseSource = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposUpdateResponseSourceOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposUpdateResponseSourcePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposUpdateResponseParentPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposUpdateResponseParentOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateResponseParent = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposUpdateResponseParentOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposUpdateResponseParentPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposUpdateResponseOrganization = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposUpdateResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposUpdateResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposUpdateResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposUpdateResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + organization: ReposUpdateResponseOrganization; + parent: ReposUpdateResponseParent; + source: ReposUpdateResponseSource; + }; + type ReposGetResponseSourcePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposGetResponseSourceOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetResponseSource = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposGetResponseSourceOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposGetResponseSourcePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposGetResponseParentPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposGetResponseParentOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetResponseParent = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposGetResponseParentOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposGetResponseParentPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposGetResponseOrganization = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetResponseLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type ReposGetResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposGetResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposGetResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposGetResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposGetResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + license: ReposGetResponseLicense; + organization: ReposGetResponseOrganization; + parent: ReposGetResponseParent; + source: ReposGetResponseSource; + }; + type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateUsingTemplateResponseTemplateRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposCreateUsingTemplateResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposCreateUsingTemplateResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateUsingTemplateResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposCreateUsingTemplateResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposCreateUsingTemplateResponsePermissions; + allow_rebase_merge: boolean; + template_repository: ReposCreateUsingTemplateResponseTemplateRepository; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposCreateInOrgResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposCreateInOrgResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateInOrgResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposCreateInOrgResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposCreateInOrgResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposCreateForAuthenticatedUserResponsePermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposCreateForAuthenticatedUserResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposCreateForAuthenticatedUserResponse = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposCreateForAuthenticatedUserResponseOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposCreateForAuthenticatedUserResponsePermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ReposListPublicResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListPublicResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListPublicResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ReposListForOrgResponseItemLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type ReposListForOrgResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ReposListForOrgResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReposListForOrgResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ReposListForOrgResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ReposListForOrgResponseItemPermissions; + template_repository: null; + subscribers_count: number; + network_count: number; + license: ReposListForOrgResponseItemLicense; + }; + type ReactionsDeleteResponse = {}; + type ReactionsCreateForTeamDiscussionCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForTeamDiscussionCommentResponse = { + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForTeamDiscussionCommentResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForTeamDiscussionCommentResponseItem = { + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentResponseItemUser; + content: string; + created_at: string; + }; + type ReactionsCreateForTeamDiscussionResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForTeamDiscussionResponse = { + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForTeamDiscussionResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForTeamDiscussionResponseItem = { + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionResponseItemUser; + content: string; + created_at: string; + }; + type ReactionsCreateForPullRequestReviewCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForPullRequestReviewCommentResponse = { + id: number; + node_id: string; + user: ReactionsCreateForPullRequestReviewCommentResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForPullRequestReviewCommentResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForPullRequestReviewCommentResponseItem = { + id: number; + node_id: string; + user: ReactionsListForPullRequestReviewCommentResponseItemUser; + content: string; + created_at: string; + }; + type ReactionsCreateForIssueCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForIssueCommentResponse = { + id: number; + node_id: string; + user: ReactionsCreateForIssueCommentResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForIssueCommentResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForIssueCommentResponseItem = { + id: number; + node_id: string; + user: ReactionsListForIssueCommentResponseItemUser; + content: string; + created_at: string; + }; + type ReactionsCreateForIssueResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForIssueResponse = { + id: number; + node_id: string; + user: ReactionsCreateForIssueResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForIssueResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForIssueResponseItem = { + id: number; + node_id: string; + user: ReactionsListForIssueResponseItemUser; + content: string; + created_at: string; + }; + type ReactionsCreateForCommitCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsCreateForCommitCommentResponse = { + id: number; + node_id: string; + user: ReactionsCreateForCommitCommentResponseUser; + content: string; + created_at: string; + }; + type ReactionsListForCommitCommentResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ReactionsListForCommitCommentResponseItem = { + id: number; + node_id: string; + user: ReactionsListForCommitCommentResponseItemUser; + content: string; + created_at: string; + }; + type RateLimitGetResponseRate = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesIntegrationManifest = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesGraphql = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesSearch = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResourcesCore = { + limit: number; + remaining: number; + reset: number; + }; + type RateLimitGetResponseResources = { + core: RateLimitGetResponseResourcesCore; + search: RateLimitGetResponseResourcesSearch; + graphql: RateLimitGetResponseResourcesGraphql; + integration_manifest: RateLimitGetResponseResourcesIntegrationManifest; + }; + type RateLimitGetResponse = { + resources: RateLimitGetResponseResources; + rate: RateLimitGetResponseRate; + }; + type PullsDismissReviewResponseLinksPullRequest = { href: string }; + type PullsDismissReviewResponseLinksHtml = { href: string }; + type PullsDismissReviewResponseLinks = { + html: PullsDismissReviewResponseLinksHtml; + pull_request: PullsDismissReviewResponseLinksPullRequest; + }; + type PullsDismissReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsDismissReviewResponse = { + id: number; + node_id: string; + user: PullsDismissReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsDismissReviewResponseLinks; + }; + type PullsSubmitReviewResponseLinksPullRequest = { href: string }; + type PullsSubmitReviewResponseLinksHtml = { href: string }; + type PullsSubmitReviewResponseLinks = { + html: PullsSubmitReviewResponseLinksHtml; + pull_request: PullsSubmitReviewResponseLinksPullRequest; + }; + type PullsSubmitReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsSubmitReviewResponse = { + id: number; + node_id: string; + user: PullsSubmitReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsSubmitReviewResponseLinks; + }; + type PullsUpdateReviewResponseLinksPullRequest = { href: string }; + type PullsUpdateReviewResponseLinksHtml = { href: string }; + type PullsUpdateReviewResponseLinks = { + html: PullsUpdateReviewResponseLinksHtml; + pull_request: PullsUpdateReviewResponseLinksPullRequest; + }; + type PullsUpdateReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateReviewResponse = { + id: number; + node_id: string; + user: PullsUpdateReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsUpdateReviewResponseLinks; + }; + type PullsCreateReviewResponseLinksPullRequest = { href: string }; + type PullsCreateReviewResponseLinksHtml = { href: string }; + type PullsCreateReviewResponseLinks = { + html: PullsCreateReviewResponseLinksHtml; + pull_request: PullsCreateReviewResponseLinksPullRequest; + }; + type PullsCreateReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewResponse = { + id: number; + node_id: string; + user: PullsCreateReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsCreateReviewResponseLinks; + }; + type PullsGetCommentsForReviewResponseItemLinksPullRequest = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksHtml = { href: string }; + type PullsGetCommentsForReviewResponseItemLinksSelf = { href: string }; + type PullsGetCommentsForReviewResponseItemLinks = { + self: PullsGetCommentsForReviewResponseItemLinksSelf; + html: PullsGetCommentsForReviewResponseItemLinksHtml; + pull_request: PullsGetCommentsForReviewResponseItemLinksPullRequest; + }; + type PullsGetCommentsForReviewResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetCommentsForReviewResponseItem = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsGetCommentsForReviewResponseItemUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsGetCommentsForReviewResponseItemLinks; + }; + type PullsDeletePendingReviewResponseLinksPullRequest = { href: string }; + type PullsDeletePendingReviewResponseLinksHtml = { href: string }; + type PullsDeletePendingReviewResponseLinks = { + html: PullsDeletePendingReviewResponseLinksHtml; + pull_request: PullsDeletePendingReviewResponseLinksPullRequest; + }; + type PullsDeletePendingReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsDeletePendingReviewResponse = { + id: number; + node_id: string; + user: PullsDeletePendingReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsDeletePendingReviewResponseLinks; + }; + type PullsGetReviewResponseLinksPullRequest = { href: string }; + type PullsGetReviewResponseLinksHtml = { href: string }; + type PullsGetReviewResponseLinks = { + html: PullsGetReviewResponseLinksHtml; + pull_request: PullsGetReviewResponseLinksPullRequest; + }; + type PullsGetReviewResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetReviewResponse = { + id: number; + node_id: string; + user: PullsGetReviewResponseUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsGetReviewResponseLinks; + }; + type PullsListReviewsResponseItemLinksPullRequest = { href: string }; + type PullsListReviewsResponseItemLinksHtml = { href: string }; + type PullsListReviewsResponseItemLinks = { + html: PullsListReviewsResponseItemLinksHtml; + pull_request: PullsListReviewsResponseItemLinksPullRequest; + }; + type PullsListReviewsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListReviewsResponseItem = { + id: number; + node_id: string; + user: PullsListReviewsResponseItemUser; + body: string; + commit_id: string; + state: string; + html_url: string; + pull_request_url: string; + _links: PullsListReviewsResponseItemLinks; + }; + type PullsDeleteReviewRequestResponse = {}; + type PullsCreateReviewRequestResponseLinksStatuses = { href: string }; + type PullsCreateReviewRequestResponseLinksCommits = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComment = { href: string }; + type PullsCreateReviewRequestResponseLinksReviewComments = { href: string }; + type PullsCreateReviewRequestResponseLinksComments = { href: string }; + type PullsCreateReviewRequestResponseLinksIssue = { href: string }; + type PullsCreateReviewRequestResponseLinksHtml = { href: string }; + type PullsCreateReviewRequestResponseLinksSelf = { href: string }; + type PullsCreateReviewRequestResponseLinks = { + self: PullsCreateReviewRequestResponseLinksSelf; + html: PullsCreateReviewRequestResponseLinksHtml; + issue: PullsCreateReviewRequestResponseLinksIssue; + comments: PullsCreateReviewRequestResponseLinksComments; + review_comments: PullsCreateReviewRequestResponseLinksReviewComments; + review_comment: PullsCreateReviewRequestResponseLinksReviewComment; + commits: PullsCreateReviewRequestResponseLinksCommits; + statuses: PullsCreateReviewRequestResponseLinksStatuses; + }; + type PullsCreateReviewRequestResponseBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateReviewRequestResponseBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateReviewRequestResponseBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateReviewRequestResponseBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateReviewRequestResponseBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseBase = { + label: string; + ref: string; + sha: string; + user: PullsCreateReviewRequestResponseBaseUser; + repo: PullsCreateReviewRequestResponseBaseRepo; + }; + type PullsCreateReviewRequestResponseHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateReviewRequestResponseHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateReviewRequestResponseHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateReviewRequestResponseHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateReviewRequestResponseHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseHead = { + label: string; + ref: string; + sha: string; + user: PullsCreateReviewRequestResponseHeadUser; + repo: PullsCreateReviewRequestResponseHeadRepo; + }; + type PullsCreateReviewRequestResponseRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsCreateReviewRequestResponseRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsCreateReviewRequestResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsCreateReviewRequestResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsCreateReviewRequestResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateReviewRequestResponse = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsCreateReviewRequestResponseUser; + body: string; + labels: Array; + milestone: PullsCreateReviewRequestResponseMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsCreateReviewRequestResponseAssignee; + assignees: Array; + requested_reviewers: Array< + PullsCreateReviewRequestResponseRequestedReviewersItem + >; + requested_teams: Array; + head: PullsCreateReviewRequestResponseHead; + base: PullsCreateReviewRequestResponseBase; + _links: PullsCreateReviewRequestResponseLinks; + author_association: string; + draft: boolean; + }; + type PullsListReviewRequestsResponseTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsListReviewRequestsResponseUsersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListReviewRequestsResponse = { + users: Array; + teams: Array; + }; + type PullsDeleteCommentResponse = {}; + type PullsUpdateCommentResponseLinksPullRequest = { href: string }; + type PullsUpdateCommentResponseLinksHtml = { href: string }; + type PullsUpdateCommentResponseLinksSelf = { href: string }; + type PullsUpdateCommentResponseLinks = { + self: PullsUpdateCommentResponseLinksSelf; + html: PullsUpdateCommentResponseLinksHtml; + pull_request: PullsUpdateCommentResponseLinksPullRequest; + }; + type PullsUpdateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateCommentResponse = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsUpdateCommentResponseUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsUpdateCommentResponseLinks; + }; + type PullsCreateCommentReplyResponseLinksPullRequest = { href: string }; + type PullsCreateCommentReplyResponseLinksHtml = { href: string }; + type PullsCreateCommentReplyResponseLinksSelf = { href: string }; + type PullsCreateCommentReplyResponseLinks = { + self: PullsCreateCommentReplyResponseLinksSelf; + html: PullsCreateCommentReplyResponseLinksHtml; + pull_request: PullsCreateCommentReplyResponseLinksPullRequest; + }; + type PullsCreateCommentReplyResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateCommentReplyResponse = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsCreateCommentReplyResponseUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsCreateCommentReplyResponseLinks; + }; + type PullsCreateCommentResponseLinksPullRequest = { href: string }; + type PullsCreateCommentResponseLinksHtml = { href: string }; + type PullsCreateCommentResponseLinksSelf = { href: string }; + type PullsCreateCommentResponseLinks = { + self: PullsCreateCommentResponseLinksSelf; + html: PullsCreateCommentResponseLinksHtml; + pull_request: PullsCreateCommentResponseLinksPullRequest; + }; + type PullsCreateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateCommentResponse = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsCreateCommentResponseUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsCreateCommentResponseLinks; + }; + type PullsGetCommentResponseLinksPullRequest = { href: string }; + type PullsGetCommentResponseLinksHtml = { href: string }; + type PullsGetCommentResponseLinksSelf = { href: string }; + type PullsGetCommentResponseLinks = { + self: PullsGetCommentResponseLinksSelf; + html: PullsGetCommentResponseLinksHtml; + pull_request: PullsGetCommentResponseLinksPullRequest; + }; + type PullsGetCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetCommentResponse = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsGetCommentResponseUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsGetCommentResponseLinks; + }; + type PullsListCommentsForRepoResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsForRepoResponseItemLinksHtml = { href: string }; + type PullsListCommentsForRepoResponseItemLinksSelf = { href: string }; + type PullsListCommentsForRepoResponseItemLinks = { + self: PullsListCommentsForRepoResponseItemLinksSelf; + html: PullsListCommentsForRepoResponseItemLinksHtml; + pull_request: PullsListCommentsForRepoResponseItemLinksPullRequest; + }; + type PullsListCommentsForRepoResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListCommentsForRepoResponseItem = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsListCommentsForRepoResponseItemUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsListCommentsForRepoResponseItemLinks; + }; + type PullsListCommentsResponseItemLinksPullRequest = { href: string }; + type PullsListCommentsResponseItemLinksHtml = { href: string }; + type PullsListCommentsResponseItemLinksSelf = { href: string }; + type PullsListCommentsResponseItemLinks = { + self: PullsListCommentsResponseItemLinksSelf; + html: PullsListCommentsResponseItemLinksHtml; + pull_request: PullsListCommentsResponseItemLinksPullRequest; + }; + type PullsListCommentsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListCommentsResponseItem = { + url: string; + id: number; + node_id: string; + pull_request_review_id: number; + diff_hunk: string; + path: string; + position: number; + original_position: number; + commit_id: string; + original_commit_id: string; + in_reply_to_id: number; + user: PullsListCommentsResponseItemUser; + body: string; + created_at: string; + updated_at: string; + html_url: string; + pull_request_url: string; + _links: PullsListCommentsResponseItemLinks; + }; + type PullsListFilesResponseItem = { + sha: string; + filename: string; + status: string; + additions: number; + deletions: number; + changes: number; + blob_url: string; + raw_url: string; + contents_url: string; + patch: string; + }; + type PullsListCommitsResponseItemParentsItem = { url: string; sha: string }; + type PullsListCommitsResponseItemCommitter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListCommitsResponseItemAuthor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListCommitsResponseItemCommitVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type PullsListCommitsResponseItemCommitTree = { url: string; sha: string }; + type PullsListCommitsResponseItemCommitCommitter = { + name: string; + email: string; + date: string; + }; + type PullsListCommitsResponseItemCommitAuthor = { + name: string; + email: string; + date: string; + }; + type PullsListCommitsResponseItemCommit = { + url: string; + author: PullsListCommitsResponseItemCommitAuthor; + committer: PullsListCommitsResponseItemCommitCommitter; + message: string; + tree: PullsListCommitsResponseItemCommitTree; + comment_count: number; + verification: PullsListCommitsResponseItemCommitVerification; + }; + type PullsListCommitsResponseItem = { + url: string; + sha: string; + node_id: string; + html_url: string; + comments_url: string; + commit: PullsListCommitsResponseItemCommit; + author: PullsListCommitsResponseItemAuthor; + committer: PullsListCommitsResponseItemCommitter; + parents: Array; + }; + type PullsUpdateResponseMergedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseLinksStatuses = { href: string }; + type PullsUpdateResponseLinksCommits = { href: string }; + type PullsUpdateResponseLinksReviewComment = { href: string }; + type PullsUpdateResponseLinksReviewComments = { href: string }; + type PullsUpdateResponseLinksComments = { href: string }; + type PullsUpdateResponseLinksIssue = { href: string }; + type PullsUpdateResponseLinksHtml = { href: string }; + type PullsUpdateResponseLinksSelf = { href: string }; + type PullsUpdateResponseLinks = { + self: PullsUpdateResponseLinksSelf; + html: PullsUpdateResponseLinksHtml; + issue: PullsUpdateResponseLinksIssue; + comments: PullsUpdateResponseLinksComments; + review_comments: PullsUpdateResponseLinksReviewComments; + review_comment: PullsUpdateResponseLinksReviewComment; + commits: PullsUpdateResponseLinksCommits; + statuses: PullsUpdateResponseLinksStatuses; + }; + type PullsUpdateResponseBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsUpdateResponseBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsUpdateResponseBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsUpdateResponseBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsUpdateResponseBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseBase = { + label: string; + ref: string; + sha: string; + user: PullsUpdateResponseBaseUser; + repo: PullsUpdateResponseBaseRepo; + }; + type PullsUpdateResponseHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsUpdateResponseHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsUpdateResponseHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsUpdateResponseHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsUpdateResponseHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseHead = { + label: string; + ref: string; + sha: string; + user: PullsUpdateResponseHeadUser; + repo: PullsUpdateResponseHeadRepo; + }; + type PullsUpdateResponseRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsUpdateResponseRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsUpdateResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsUpdateResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsUpdateResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsUpdateResponse = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsUpdateResponseUser; + body: string; + labels: Array; + milestone: PullsUpdateResponseMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsUpdateResponseAssignee; + assignees: Array; + requested_reviewers: Array; + requested_teams: Array; + head: PullsUpdateResponseHead; + base: PullsUpdateResponseBase; + _links: PullsUpdateResponseLinks; + author_association: string; + draft: boolean; + merged: boolean; + mergeable: boolean; + rebaseable: boolean; + mergeable_state: string; + merged_by: PullsUpdateResponseMergedBy; + comments: number; + review_comments: number; + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + changed_files: number; + }; + type PullsUpdateBranchResponse = { message: string; url: string }; + type PullsCreateFromIssueResponseMergedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseLinksStatuses = { href: string }; + type PullsCreateFromIssueResponseLinksCommits = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComment = { href: string }; + type PullsCreateFromIssueResponseLinksReviewComments = { href: string }; + type PullsCreateFromIssueResponseLinksComments = { href: string }; + type PullsCreateFromIssueResponseLinksIssue = { href: string }; + type PullsCreateFromIssueResponseLinksHtml = { href: string }; + type PullsCreateFromIssueResponseLinksSelf = { href: string }; + type PullsCreateFromIssueResponseLinks = { + self: PullsCreateFromIssueResponseLinksSelf; + html: PullsCreateFromIssueResponseLinksHtml; + issue: PullsCreateFromIssueResponseLinksIssue; + comments: PullsCreateFromIssueResponseLinksComments; + review_comments: PullsCreateFromIssueResponseLinksReviewComments; + review_comment: PullsCreateFromIssueResponseLinksReviewComment; + commits: PullsCreateFromIssueResponseLinksCommits; + statuses: PullsCreateFromIssueResponseLinksStatuses; + }; + type PullsCreateFromIssueResponseBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateFromIssueResponseBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateFromIssueResponseBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateFromIssueResponseBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateFromIssueResponseBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseBase = { + label: string; + ref: string; + sha: string; + user: PullsCreateFromIssueResponseBaseUser; + repo: PullsCreateFromIssueResponseBaseRepo; + }; + type PullsCreateFromIssueResponseHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateFromIssueResponseHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateFromIssueResponseHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateFromIssueResponseHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateFromIssueResponseHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseHead = { + label: string; + ref: string; + sha: string; + user: PullsCreateFromIssueResponseHeadUser; + repo: PullsCreateFromIssueResponseHeadRepo; + }; + type PullsCreateFromIssueResponseRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsCreateFromIssueResponseRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsCreateFromIssueResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsCreateFromIssueResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsCreateFromIssueResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateFromIssueResponse = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsCreateFromIssueResponseUser; + body: string; + labels: Array; + milestone: PullsCreateFromIssueResponseMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsCreateFromIssueResponseAssignee; + assignees: Array; + requested_reviewers: Array< + PullsCreateFromIssueResponseRequestedReviewersItem + >; + requested_teams: Array; + head: PullsCreateFromIssueResponseHead; + base: PullsCreateFromIssueResponseBase; + _links: PullsCreateFromIssueResponseLinks; + author_association: string; + draft: boolean; + merged: boolean; + mergeable: boolean; + rebaseable: boolean; + mergeable_state: string; + merged_by: PullsCreateFromIssueResponseMergedBy; + comments: number; + review_comments: number; + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + changed_files: number; + }; + type PullsCreateResponseMergedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseLinksStatuses = { href: string }; + type PullsCreateResponseLinksCommits = { href: string }; + type PullsCreateResponseLinksReviewComment = { href: string }; + type PullsCreateResponseLinksReviewComments = { href: string }; + type PullsCreateResponseLinksComments = { href: string }; + type PullsCreateResponseLinksIssue = { href: string }; + type PullsCreateResponseLinksHtml = { href: string }; + type PullsCreateResponseLinksSelf = { href: string }; + type PullsCreateResponseLinks = { + self: PullsCreateResponseLinksSelf; + html: PullsCreateResponseLinksHtml; + issue: PullsCreateResponseLinksIssue; + comments: PullsCreateResponseLinksComments; + review_comments: PullsCreateResponseLinksReviewComments; + review_comment: PullsCreateResponseLinksReviewComment; + commits: PullsCreateResponseLinksCommits; + statuses: PullsCreateResponseLinksStatuses; + }; + type PullsCreateResponseBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateResponseBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateResponseBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateResponseBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateResponseBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseBase = { + label: string; + ref: string; + sha: string; + user: PullsCreateResponseBaseUser; + repo: PullsCreateResponseBaseRepo; + }; + type PullsCreateResponseHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsCreateResponseHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsCreateResponseHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsCreateResponseHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsCreateResponseHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseHead = { + label: string; + ref: string; + sha: string; + user: PullsCreateResponseHeadUser; + repo: PullsCreateResponseHeadRepo; + }; + type PullsCreateResponseRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsCreateResponseRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsCreateResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsCreateResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsCreateResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsCreateResponse = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsCreateResponseUser; + body: string; + labels: Array; + milestone: PullsCreateResponseMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsCreateResponseAssignee; + assignees: Array; + requested_reviewers: Array; + requested_teams: Array; + head: PullsCreateResponseHead; + base: PullsCreateResponseBase; + _links: PullsCreateResponseLinks; + author_association: string; + draft: boolean; + merged: boolean; + mergeable: boolean; + rebaseable: boolean; + mergeable_state: string; + merged_by: PullsCreateResponseMergedBy; + comments: number; + review_comments: number; + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + changed_files: number; + }; + type PullsGetResponseMergedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseLinksStatuses = { href: string }; + type PullsGetResponseLinksCommits = { href: string }; + type PullsGetResponseLinksReviewComment = { href: string }; + type PullsGetResponseLinksReviewComments = { href: string }; + type PullsGetResponseLinksComments = { href: string }; + type PullsGetResponseLinksIssue = { href: string }; + type PullsGetResponseLinksHtml = { href: string }; + type PullsGetResponseLinksSelf = { href: string }; + type PullsGetResponseLinks = { + self: PullsGetResponseLinksSelf; + html: PullsGetResponseLinksHtml; + issue: PullsGetResponseLinksIssue; + comments: PullsGetResponseLinksComments; + review_comments: PullsGetResponseLinksReviewComments; + review_comment: PullsGetResponseLinksReviewComment; + commits: PullsGetResponseLinksCommits; + statuses: PullsGetResponseLinksStatuses; + }; + type PullsGetResponseBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsGetResponseBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsGetResponseBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsGetResponseBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsGetResponseBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseBase = { + label: string; + ref: string; + sha: string; + user: PullsGetResponseBaseUser; + repo: PullsGetResponseBaseRepo; + }; + type PullsGetResponseHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsGetResponseHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsGetResponseHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsGetResponseHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsGetResponseHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseHead = { + label: string; + ref: string; + sha: string; + user: PullsGetResponseHeadUser; + repo: PullsGetResponseHeadRepo; + }; + type PullsGetResponseRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsGetResponseRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsGetResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsGetResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsGetResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsGetResponse = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsGetResponseUser; + body: string; + labels: Array; + milestone: PullsGetResponseMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsGetResponseAssignee; + assignees: Array; + requested_reviewers: Array; + requested_teams: Array; + head: PullsGetResponseHead; + base: PullsGetResponseBase; + _links: PullsGetResponseLinks; + author_association: string; + draft: boolean; + merged: boolean; + mergeable: boolean; + rebaseable: boolean; + mergeable_state: string; + merged_by: PullsGetResponseMergedBy; + comments: number; + review_comments: number; + maintainer_can_modify: boolean; + commits: number; + additions: number; + deletions: number; + changed_files: number; + }; + type PullsListResponseItemLinksStatuses = { href: string }; + type PullsListResponseItemLinksCommits = { href: string }; + type PullsListResponseItemLinksReviewComment = { href: string }; + type PullsListResponseItemLinksReviewComments = { href: string }; + type PullsListResponseItemLinksComments = { href: string }; + type PullsListResponseItemLinksIssue = { href: string }; + type PullsListResponseItemLinksHtml = { href: string }; + type PullsListResponseItemLinksSelf = { href: string }; + type PullsListResponseItemLinks = { + self: PullsListResponseItemLinksSelf; + html: PullsListResponseItemLinksHtml; + issue: PullsListResponseItemLinksIssue; + comments: PullsListResponseItemLinksComments; + review_comments: PullsListResponseItemLinksReviewComments; + review_comment: PullsListResponseItemLinksReviewComment; + commits: PullsListResponseItemLinksCommits; + statuses: PullsListResponseItemLinksStatuses; + }; + type PullsListResponseItemBaseRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsListResponseItemBaseRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemBaseRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsListResponseItemBaseRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsListResponseItemBaseRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsListResponseItemBaseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemBase = { + label: string; + ref: string; + sha: string; + user: PullsListResponseItemBaseUser; + repo: PullsListResponseItemBaseRepo; + }; + type PullsListResponseItemHeadRepoPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type PullsListResponseItemHeadRepoOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemHeadRepo = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: PullsListResponseItemHeadRepoOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: PullsListResponseItemHeadRepoPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type PullsListResponseItemHeadUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemHead = { + label: string; + ref: string; + sha: string; + user: PullsListResponseItemHeadUser; + repo: PullsListResponseItemHeadRepo; + }; + type PullsListResponseItemRequestedTeamsItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type PullsListResponseItemRequestedReviewersItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: PullsListResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type PullsListResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type PullsListResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type PullsListResponseItem = { + url: string; + id: number; + node_id: string; + html_url: string; + diff_url: string; + patch_url: string; + issue_url: string; + commits_url: string; + review_comments_url: string; + review_comment_url: string; + comments_url: string; + statuses_url: string; + number: number; + state: string; + locked: boolean; + title: string; + user: PullsListResponseItemUser; + body: string; + labels: Array; + milestone: PullsListResponseItemMilestone; + active_lock_reason: string; + created_at: string; + updated_at: string; + closed_at: string; + merged_at: string; + merge_commit_sha: string; + assignee: PullsListResponseItemAssignee; + assignees: Array; + requested_reviewers: Array; + requested_teams: Array; + head: PullsListResponseItemHead; + base: PullsListResponseItemBase; + _links: PullsListResponseItemLinks; + author_association: string; + draft: boolean; + }; + type ProjectsMoveColumnResponse = {}; + type ProjectsDeleteColumnResponse = {}; + type ProjectsListColumnsResponseItem = { + url: string; + project_url: string; + cards_url: string; + id: number; + node_id: string; + name: string; + created_at: string; + updated_at: string; + }; + type ProjectsRemoveCollaboratorResponse = {}; + type ProjectsAddCollaboratorResponse = {}; + type ProjectsReviewUserPermissionLevelResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsReviewUserPermissionLevelResponse = { + permission: string; + user: ProjectsReviewUserPermissionLevelResponseUser; + }; + type ProjectsListCollaboratorsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsMoveCardResponse = {}; + type ProjectsDeleteCardResponse = {}; + type ProjectsCreateCardResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsCreateCardResponse = { + url: string; + id: number; + node_id: string; + note: string; + creator: ProjectsCreateCardResponseCreator; + created_at: string; + updated_at: string; + archived: boolean; + column_url: string; + content_url: string; + project_url: string; + }; + type ProjectsListCardsResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsListCardsResponseItem = { + url: string; + id: number; + node_id: string; + note: string; + creator: ProjectsListCardsResponseItemCreator; + created_at: string; + updated_at: string; + archived: boolean; + column_url: string; + content_url: string; + project_url: string; + }; + type ProjectsUpdateResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsUpdateResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsUpdateResponseCreator; + created_at: string; + updated_at: string; + }; + type ProjectsCreateForAuthenticatedUserResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsCreateForAuthenticatedUserResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsCreateForAuthenticatedUserResponseCreator; + created_at: string; + updated_at: string; + }; + type ProjectsCreateForOrgResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsCreateForOrgResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsCreateForOrgResponseCreator; + created_at: string; + updated_at: string; + }; + type ProjectsCreateForRepoResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsCreateForRepoResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsCreateForRepoResponseCreator; + created_at: string; + updated_at: string; + }; + type ProjectsGetResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsGetResponse = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsGetResponseCreator; + created_at: string; + updated_at: string; + }; + type ProjectsListForUserResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsListForUserResponseItem = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsListForUserResponseItemCreator; + created_at: string; + updated_at: string; + }; + type ProjectsListForOrgResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsListForOrgResponseItem = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsListForOrgResponseItemCreator; + created_at: string; + updated_at: string; + }; + type ProjectsListForRepoResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ProjectsListForRepoResponseItem = { + owner_url: string; + url: string; + html_url: string; + columns_url: string; + id: number; + node_id: string; + name: string; + body: string; + number: number; + state: string; + creator: ProjectsListForRepoResponseItemCreator; + created_at: string; + updated_at: string; + }; + type OrgsConvertMemberToOutsideCollaboratorResponse = {}; + type OrgsRemoveOutsideCollaboratorResponse = {}; + type OrgsListOutsideCollaboratorsResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsUpdateMembershipResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsUpdateMembershipResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OrgsUpdateMembershipResponse = { + url: string; + state: string; + role: string; + organization_url: string; + organization: OrgsUpdateMembershipResponseOrganization; + user: OrgsUpdateMembershipResponseUser; + }; + type OrgsGetMembershipForAuthenticatedUserResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsGetMembershipForAuthenticatedUserResponseOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OrgsGetMembershipForAuthenticatedUserResponse = { + url: string; + state: string; + role: string; + organization_url: string; + organization: OrgsGetMembershipForAuthenticatedUserResponseOrganization; + user: OrgsGetMembershipForAuthenticatedUserResponseUser; + }; + type OrgsListMembershipsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsListMembershipsResponseItemOrganization = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OrgsListMembershipsResponseItem = { + url: string; + state: string; + role: string; + organization_url: string; + organization: OrgsListMembershipsResponseItemOrganization; + user: OrgsListMembershipsResponseItemUser; + }; + type OrgsCreateInvitationResponseInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsCreateInvitationResponse = { + id: number; + login: string; + email: string; + role: string; + created_at: string; + inviter: OrgsCreateInvitationResponseInviter; + team_count: number; + invitation_team_url: string; + }; + type OrgsListPendingInvitationsResponseItemInviter = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsListPendingInvitationsResponseItem = { + id: number; + login: string; + email: string; + role: string; + created_at: string; + inviter: OrgsListPendingInvitationsResponseItemInviter; + team_count: number; + invitation_team_url: string; + }; + type OrgsListInvitationTeamsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + slug: string; + description: string; + privacy: string; + permission: string; + members_url: string; + repositories_url: string; + parent: null; + }; + type OrgsRemoveMembershipResponse = {}; + type OrgsConcealMembershipResponse = {}; + type OrgsPublicizeMembershipResponse = {}; + type OrgsListPublicMembersResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsRemoveMemberResponse = {}; + type OrgsListMembersResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsDeleteHookResponse = {}; + type OrgsPingHookResponse = {}; + type OrgsUpdateHookResponseConfig = { url: string; content_type: string }; + type OrgsUpdateHookResponse = { + id: number; + url: string; + ping_url: string; + name: string; + events: Array; + active: boolean; + config: OrgsUpdateHookResponseConfig; + updated_at: string; + created_at: string; + }; + type OrgsCreateHookResponseConfig = { url: string; content_type: string }; + type OrgsCreateHookResponse = { + id: number; + url: string; + ping_url: string; + name: string; + events: Array; + active: boolean; + config: OrgsCreateHookResponseConfig; + updated_at: string; + created_at: string; + }; + type OrgsGetHookResponseConfig = { url: string; content_type: string }; + type OrgsGetHookResponse = { + id: number; + url: string; + ping_url: string; + name: string; + events: Array; + active: boolean; + config: OrgsGetHookResponseConfig; + updated_at: string; + created_at: string; + }; + type OrgsListHooksResponseItemConfig = { url: string; content_type: string }; + type OrgsListHooksResponseItem = { + id: number; + url: string; + ping_url: string; + name: string; + events: Array; + active: boolean; + config: OrgsListHooksResponseItemConfig; + updated_at: string; + created_at: string; + }; + type OrgsUnblockUserResponse = {}; + type OrgsBlockUserResponse = {}; + type OrgsCheckBlockedUserResponse = {}; + type OrgsListBlockedUsersResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OrgsUpdateResponsePlan = { + name: string; + space: number; + private_repos: number; + }; + type OrgsUpdateResponse = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + total_private_repos: number; + owned_private_repos: number; + private_gists: number; + disk_usage: number; + collaborators: number; + billing_email: string; + plan: OrgsUpdateResponsePlan; + default_repository_settings: string; + members_can_create_repositories: boolean; + two_factor_requirement_enabled: boolean; + members_allowed_repository_creation_type: string; + }; + type OrgsGetResponsePlan = { + name: string; + space: number; + private_repos: number; + }; + type OrgsGetResponse = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + name: string; + company: string; + blog: string; + location: string; + email: string; + is_verified: boolean; + has_organization_projects: boolean; + has_repository_projects: boolean; + public_repos: number; + public_gists: number; + followers: number; + following: number; + html_url: string; + created_at: string; + type: string; + total_private_repos: number; + owned_private_repos: number; + private_gists: number; + disk_usage: number; + collaborators: number; + billing_email: string; + plan: OrgsGetResponsePlan; + default_repository_settings: string; + members_can_create_repositories: boolean; + two_factor_requirement_enabled: boolean; + members_allowed_repository_creation_type: string; + }; + type OrgsListForUserResponseItem = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OrgsListResponseItem = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OrgsListForAuthenticatedUserResponseItem = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type OauthAuthorizationsRevokeGrantForApplicationResponse = {}; + type OauthAuthorizationsRevokeAuthorizationForApplicationResponse = {}; + type OauthAuthorizationsResetAuthorizationResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OauthAuthorizationsResetAuthorizationResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsResetAuthorizationResponse = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsResetAuthorizationResponseApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + user: OauthAuthorizationsResetAuthorizationResponseUser; + }; + type OauthAuthorizationsCheckAuthorizationResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type OauthAuthorizationsCheckAuthorizationResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsCheckAuthorizationResponse = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsCheckAuthorizationResponseApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + user: OauthAuthorizationsCheckAuthorizationResponseUser; + }; + type OauthAuthorizationsDeleteAuthorizationResponse = {}; + type OauthAuthorizationsUpdateAuthorizationResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsUpdateAuthorizationResponse = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsUpdateAuthorizationResponseApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + }; + type OauthAuthorizationsCreateAuthorizationResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsCreateAuthorizationResponse = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsCreateAuthorizationResponseApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + }; + type OauthAuthorizationsGetAuthorizationResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsGetAuthorizationResponse = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsGetAuthorizationResponseApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItemApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsListAuthorizationsResponseItem = { + id: number; + url: string; + scopes: Array; + token: string; + token_last_eight: string; + hashed_token: string; + app: OauthAuthorizationsListAuthorizationsResponseItemApp; + note: string; + note_url: string; + updated_at: string; + created_at: string; + fingerprint: string; + }; + type OauthAuthorizationsDeleteGrantResponse = {}; + type OauthAuthorizationsGetGrantResponseApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsGetGrantResponse = { + id: number; + url: string; + app: OauthAuthorizationsGetGrantResponseApp; + created_at: string; + updated_at: string; + scopes: Array; + }; + type OauthAuthorizationsListGrantsResponseItemApp = { + url: string; + name: string; + client_id: string; + }; + type OauthAuthorizationsListGrantsResponseItem = { + id: number; + url: string; + app: OauthAuthorizationsListGrantsResponseItemApp; + created_at: string; + updated_at: string; + scopes: Array; + }; + type MigrationsUnlockRepoForAuthenticatedUserResponse = {}; + type MigrationsDeleteArchiveForAuthenticatedUserResponse = {}; + type MigrationsGetArchiveForAuthenticatedUserResponse = {}; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsGetStatusForAuthenticatedUserResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsGetStatusForAuthenticatedUserResponse = { + id: number; + owner: MigrationsGetStatusForAuthenticatedUserResponseOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array< + MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem + >; + url: string; + created_at: string; + updated_at: string; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsListForAuthenticatedUserResponseItemRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsListForAuthenticatedUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsListForAuthenticatedUserResponseItem = { + id: number; + owner: MigrationsListForAuthenticatedUserResponseItemOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array< + MigrationsListForAuthenticatedUserResponseItemRepositoriesItem + >; + url: string; + created_at: string; + updated_at: string; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsStartForAuthenticatedUserResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsStartForAuthenticatedUserResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsStartForAuthenticatedUserResponse = { + id: number; + owner: MigrationsStartForAuthenticatedUserResponseOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array< + MigrationsStartForAuthenticatedUserResponseRepositoriesItem + >; + url: string; + created_at: string; + updated_at: string; + }; + type MigrationsCancelImportResponse = {}; + type MigrationsGetLargeFilesResponseItem = { + ref_name: string; + path: string; + oid: string; + size: number; + }; + type MigrationsSetLfsPreferenceResponse = { + vcs: string; + use_lfs: string; + vcs_url: string; + status: string; + status_text: string; + has_large_files: boolean; + large_files_size: number; + large_files_count: number; + authors_count: number; + url: string; + html_url: string; + authors_url: string; + repository_url: string; + }; + type MigrationsMapCommitAuthorResponse = { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + url: string; + import_url: string; + }; + type MigrationsGetCommitAuthorsResponseItem = { + id: number; + remote_id: string; + remote_name: string; + email: string; + name: string; + url: string; + import_url: string; + }; + type MigrationsUpdateImportResponse = { + vcs: string; + use_lfs: string; + vcs_url: string; + status: string; + url: string; + html_url: string; + authors_url: string; + repository_url: string; + }; + type MigrationsGetImportProgressResponse = { + vcs: string; + use_lfs: string; + vcs_url: string; + status: string; + status_text: string; + has_large_files: boolean; + large_files_size: number; + large_files_count: number; + authors_count: number; + url: string; + html_url: string; + authors_url: string; + repository_url: string; + }; + type MigrationsStartImportResponse = { + vcs: string; + use_lfs: string; + vcs_url: string; + status: string; + status_text: string; + has_large_files: boolean; + large_files_size: number; + large_files_count: number; + authors_count: number; + percent: number; + commit_count: number; + url: string; + html_url: string; + authors_url: string; + repository_url: string; + }; + type MigrationsUnlockRepoForOrgResponse = {}; + type MigrationsDeleteArchiveForOrgResponse = {}; + type MigrationsGetArchiveForOrgResponse = {}; + type MigrationsGetStatusForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsGetStatusForOrgResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsGetStatusForOrgResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsGetStatusForOrgResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsGetStatusForOrgResponseOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type MigrationsGetStatusForOrgResponse = { + id: number; + owner: MigrationsGetStatusForOrgResponseOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array; + url: string; + created_at: string; + updated_at: string; + }; + type MigrationsListForOrgResponseItemRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsListForOrgResponseItemRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsListForOrgResponseItemRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsListForOrgResponseItemRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsListForOrgResponseItemRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsListForOrgResponseItemOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type MigrationsListForOrgResponseItem = { + id: number; + owner: MigrationsListForOrgResponseItemOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array; + url: string; + created_at: string; + updated_at: string; + }; + type MigrationsStartForOrgResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type MigrationsStartForOrgResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type MigrationsStartForOrgResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: MigrationsStartForOrgResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: MigrationsStartForOrgResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type MigrationsStartForOrgResponseOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type MigrationsStartForOrgResponse = { + id: number; + owner: MigrationsStartForOrgResponseOwner; + guid: string; + state: string; + lock_repositories: boolean; + exclude_attachments: boolean; + repositories: Array; + url: string; + created_at: string; + updated_at: string; + }; + type MetaGetResponse = { + verifiable_password_authentication: boolean; + hooks: Array; + git: Array; + pages: Array; + importer: Array; + }; + type MarkdownRenderRawResponse = {}; + type MarkdownRenderResponse = {}; + type LicensesGetForRepoResponseLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type LicensesGetForRepoResponseLinks = { + self: string; + git: string; + html: string; + }; + type LicensesGetForRepoResponse = { + name: string; + path: string; + sha: string; + size: number; + url: string; + html_url: string; + git_url: string; + download_url: string; + type: string; + content: string; + encoding: string; + _links: LicensesGetForRepoResponseLinks; + license: LicensesGetForRepoResponseLicense; + }; + type LicensesGetResponse = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + html_url: string; + description: string; + implementation: string; + permissions: Array; + conditions: Array; + limitations: Array; + body: string; + featured: boolean; + }; + type LicensesListResponseItem = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id?: string; + }; + type LicensesListCommonlyUsedResponseItem = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id?: string; + }; + type IssuesListEventsForTimelineResponseItemActor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForTimelineResponseItem = { + id: number; + node_id: string; + url: string; + actor: IssuesListEventsForTimelineResponseItemActor; + event: string; + commit_id: string; + commit_url: string; + created_at: string; + }; + type IssuesDeleteMilestoneResponse = {}; + type IssuesUpdateMilestoneResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateMilestoneResponse = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesUpdateMilestoneResponseCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesCreateMilestoneResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateMilestoneResponse = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesCreateMilestoneResponseCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesGetMilestoneResponseCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetMilestoneResponse = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesGetMilestoneResponseCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListMilestonesForRepoResponseItemCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListMilestonesForRepoResponseItem = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListMilestonesForRepoResponseItemCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListLabelsForMilestoneResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesRemoveLabelsResponse = {}; + type IssuesReplaceLabelsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesRemoveLabelResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesAddLabelsResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListLabelsOnIssueResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesDeleteLabelResponse = {}; + type IssuesUpdateLabelResponse = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesCreateLabelResponse = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesGetLabelResponse = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListLabelsForRepoResponseItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesGetEventResponseIssuePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesGetEventResponseIssueMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetEventResponseIssueMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesGetEventResponseIssueMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesGetEventResponseIssueAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetEventResponseIssueAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetEventResponseIssueLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesGetEventResponseIssueUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetEventResponseIssue = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesGetEventResponseIssueUser; + labels: Array; + assignee: IssuesGetEventResponseIssueAssignee; + assignees: Array; + milestone: IssuesGetEventResponseIssueMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesGetEventResponseIssuePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + }; + type IssuesGetEventResponseActor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetEventResponse = { + id: number; + node_id: string; + url: string; + actor: IssuesGetEventResponseActor; + event: string; + commit_id: string; + commit_url: string; + created_at: string; + issue: IssuesGetEventResponseIssue; + }; + type IssuesListEventsForRepoResponseItemIssuePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesListEventsForRepoResponseItemIssueMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForRepoResponseItemIssueMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListEventsForRepoResponseItemIssueMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListEventsForRepoResponseItemIssueAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForRepoResponseItemIssueAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForRepoResponseItemIssueLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListEventsForRepoResponseItemIssueUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForRepoResponseItemIssue = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesListEventsForRepoResponseItemIssueUser; + labels: Array; + assignee: IssuesListEventsForRepoResponseItemIssueAssignee; + assignees: Array; + milestone: IssuesListEventsForRepoResponseItemIssueMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesListEventsForRepoResponseItemIssuePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + }; + type IssuesListEventsForRepoResponseItemActor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsForRepoResponseItem = { + id: number; + node_id: string; + url: string; + actor: IssuesListEventsForRepoResponseItemActor; + event: string; + commit_id: string; + commit_url: string; + created_at: string; + issue: IssuesListEventsForRepoResponseItemIssue; + }; + type IssuesListEventsResponseItemActor = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListEventsResponseItem = { + id: number; + node_id: string; + url: string; + actor: IssuesListEventsResponseItemActor; + event: string; + commit_id: string; + commit_url: string; + created_at: string; + }; + type IssuesDeleteCommentResponse = {}; + type IssuesUpdateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateCommentResponse = { + id: number; + node_id: string; + url: string; + html_url: string; + body: string; + user: IssuesUpdateCommentResponseUser; + created_at: string; + updated_at: string; + }; + type IssuesCreateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateCommentResponse = { + id: number; + node_id: string; + url: string; + html_url: string; + body: string; + user: IssuesCreateCommentResponseUser; + created_at: string; + updated_at: string; + }; + type IssuesGetCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetCommentResponse = { + id: number; + node_id: string; + url: string; + html_url: string; + body: string; + user: IssuesGetCommentResponseUser; + created_at: string; + updated_at: string; + }; + type IssuesListCommentsForRepoResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListCommentsForRepoResponseItem = { + id: number; + node_id: string; + url: string; + html_url: string; + body: string; + user: IssuesListCommentsForRepoResponseItemUser; + created_at: string; + updated_at: string; + }; + type IssuesListCommentsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListCommentsResponseItem = { + id: number; + node_id: string; + url: string; + html_url: string; + body: string; + user: IssuesListCommentsResponseItemUser; + created_at: string; + updated_at: string; + }; + type IssuesRemoveAssigneesResponsePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesRemoveAssigneesResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesRemoveAssigneesResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesRemoveAssigneesResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesRemoveAssigneesResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesRemoveAssigneesResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesRemoveAssigneesResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesRemoveAssigneesResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesRemoveAssigneesResponse = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesRemoveAssigneesResponseUser; + labels: Array; + assignee: IssuesRemoveAssigneesResponseAssignee; + assignees: Array; + milestone: IssuesRemoveAssigneesResponseMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesRemoveAssigneesResponsePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + }; + type IssuesAddAssigneesResponsePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesAddAssigneesResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesAddAssigneesResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesAddAssigneesResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesAddAssigneesResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesAddAssigneesResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesAddAssigneesResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesAddAssigneesResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesAddAssigneesResponse = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesAddAssigneesResponseUser; + labels: Array; + assignee: IssuesAddAssigneesResponseAssignee; + assignees: Array; + milestone: IssuesAddAssigneesResponseMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesAddAssigneesResponsePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + }; + type IssuesCheckAssigneeResponse = {}; + type IssuesListAssigneesResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUnlockResponse = {}; + type IssuesLockResponse = {}; + type IssuesUpdateResponseClosedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateResponsePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesUpdateResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesUpdateResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesUpdateResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesUpdateResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesUpdateResponse = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesUpdateResponseUser; + labels: Array; + assignee: IssuesUpdateResponseAssignee; + assignees: Array; + milestone: IssuesUpdateResponseMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesUpdateResponsePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + closed_by: IssuesUpdateResponseClosedBy; + }; + type IssuesCreateResponseClosedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateResponsePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesCreateResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesCreateResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesCreateResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesCreateResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesCreateResponse = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesCreateResponseUser; + labels: Array; + assignee: IssuesCreateResponseAssignee; + assignees: Array; + milestone: IssuesCreateResponseMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesCreateResponsePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + closed_by: IssuesCreateResponseClosedBy; + }; + type IssuesGetResponseClosedBy = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetResponsePullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesGetResponseMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetResponseMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesGetResponseMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesGetResponseAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetResponseAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetResponseLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesGetResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesGetResponse = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesGetResponseUser; + labels: Array; + assignee: IssuesGetResponseAssignee; + assignees: Array; + milestone: IssuesGetResponseMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesGetResponsePullRequest; + closed_at: null; + created_at: string; + updated_at: string; + closed_by: IssuesGetResponseClosedBy; + }; + type IssuesListForRepoResponseItemPullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesListForRepoResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForRepoResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListForRepoResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListForRepoResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForRepoResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForRepoResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListForRepoResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForRepoResponseItem = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesListForRepoResponseItemUser; + labels: Array; + assignee: IssuesListForRepoResponseItemAssignee; + assignees: Array; + milestone: IssuesListForRepoResponseItemMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesListForRepoResponseItemPullRequest; + closed_at: null; + created_at: string; + updated_at: string; + }; + type IssuesListForOrgResponseItemRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type IssuesListForOrgResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForOrgResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: IssuesListForOrgResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: IssuesListForOrgResponseItemRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type IssuesListForOrgResponseItemPullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesListForOrgResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForOrgResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListForOrgResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListForOrgResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForOrgResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForOrgResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListForOrgResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForOrgResponseItem = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesListForOrgResponseItemUser; + labels: Array; + assignee: IssuesListForOrgResponseItemAssignee; + assignees: Array; + milestone: IssuesListForOrgResponseItemMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesListForOrgResponseItemPullRequest; + closed_at: null; + created_at: string; + updated_at: string; + repository: IssuesListForOrgResponseItemRepository; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: IssuesListForAuthenticatedUserResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: IssuesListForAuthenticatedUserResponseItemRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type IssuesListForAuthenticatedUserResponseItemPullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesListForAuthenticatedUserResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListForAuthenticatedUserResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListForAuthenticatedUserResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListForAuthenticatedUserResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListForAuthenticatedUserResponseItem = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesListForAuthenticatedUserResponseItemUser; + labels: Array; + assignee: IssuesListForAuthenticatedUserResponseItemAssignee; + assignees: Array; + milestone: IssuesListForAuthenticatedUserResponseItemMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesListForAuthenticatedUserResponseItemPullRequest; + closed_at: null; + created_at: string; + updated_at: string; + repository: IssuesListForAuthenticatedUserResponseItemRepository; + }; + type IssuesListResponseItemRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type IssuesListResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: IssuesListResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: IssuesListResponseItemRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type IssuesListResponseItemPullRequest = { + url: string; + html_url: string; + diff_url: string; + patch_url: string; + }; + type IssuesListResponseItemMilestoneCreator = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListResponseItemMilestone = { + url: string; + html_url: string; + labels_url: string; + id: number; + node_id: string; + number: number; + state: string; + title: string; + description: string; + creator: IssuesListResponseItemMilestoneCreator; + open_issues: number; + closed_issues: number; + created_at: string; + updated_at: string; + closed_at: string; + due_on: string; + }; + type IssuesListResponseItemAssigneesItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListResponseItemAssignee = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListResponseItemLabelsItem = { + id: number; + node_id: string; + url: string; + name: string; + description: string; + color: string; + default: boolean; + }; + type IssuesListResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type IssuesListResponseItem = { + id: number; + node_id: string; + url: string; + repository_url: string; + labels_url: string; + comments_url: string; + events_url: string; + html_url: string; + number: number; + state: string; + title: string; + body: string; + user: IssuesListResponseItemUser; + labels: Array; + assignee: IssuesListResponseItemAssignee; + assignees: Array; + milestone: IssuesListResponseItemMilestone; + locked: boolean; + active_lock_reason: string; + comments: number; + pull_request: IssuesListResponseItemPullRequest; + closed_at: null; + created_at: string; + updated_at: string; + repository: IssuesListResponseItemRepository; + }; + type InteractionsRemoveRestrictionsForRepoResponse = {}; + type InteractionsAddOrUpdateRestrictionsForRepoResponse = { + limit: string; + origin: string; + expires_at: string; + }; + type InteractionsGetRestrictionsForRepoResponse = { + limit: string; + origin: string; + expires_at: string; + }; + type InteractionsRemoveRestrictionsForOrgResponse = {}; + type InteractionsAddOrUpdateRestrictionsForOrgResponse = { + limit: string; + origin: string; + expires_at: string; + }; + type InteractionsGetRestrictionsForOrgResponse = { + limit: string; + origin: string; + expires_at: string; + }; + type GitignoreGetTemplateResponse = { name?: string; source?: string }; + type GitCreateTreeResponseTreeItem = { + path: string; + mode: string; + type: string; + size: number; + sha: string; + url: string; + }; + type GitCreateTreeResponse = { + sha: string; + url: string; + tree: Array; + }; + type GitCreateTagResponseVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type GitCreateTagResponseObject = { type: string; sha: string; url: string }; + type GitCreateTagResponseTagger = { + name: string; + email: string; + date: string; + }; + type GitCreateTagResponse = { + node_id: string; + tag: string; + sha: string; + url: string; + message: string; + tagger: GitCreateTagResponseTagger; + object: GitCreateTagResponseObject; + verification: GitCreateTagResponseVerification; + }; + type GitGetTagResponseVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type GitGetTagResponseObject = { type: string; sha: string; url: string }; + type GitGetTagResponseTagger = { name: string; email: string; date: string }; + type GitGetTagResponse = { + node_id: string; + tag: string; + sha: string; + url: string; + message: string; + tagger: GitGetTagResponseTagger; + object: GitGetTagResponseObject; + verification: GitGetTagResponseVerification; + }; + type GitDeleteRefResponse = {}; + type GitUpdateRefResponseObject = { type: string; sha: string; url: string }; + type GitUpdateRefResponse = { + ref: string; + node_id: string; + url: string; + object: GitUpdateRefResponseObject; + }; + type GitCreateRefResponseObject = { type: string; sha: string; url: string }; + type GitCreateRefResponse = { + ref: string; + node_id: string; + url: string; + object: GitCreateRefResponseObject; + }; + type GitCreateCommitResponseVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type GitCreateCommitResponseParentsItem = { url: string; sha: string }; + type GitCreateCommitResponseTree = { url: string; sha: string }; + type GitCreateCommitResponseCommitter = { + date: string; + name: string; + email: string; + }; + type GitCreateCommitResponseAuthor = { + date: string; + name: string; + email: string; + }; + type GitCreateCommitResponse = { + sha: string; + node_id: string; + url: string; + author: GitCreateCommitResponseAuthor; + committer: GitCreateCommitResponseCommitter; + message: string; + tree: GitCreateCommitResponseTree; + parents: Array; + verification: GitCreateCommitResponseVerification; + }; + type GitGetCommitResponseVerification = { + verified: boolean; + reason: string; + signature: null; + payload: null; + }; + type GitGetCommitResponseParentsItem = { url: string; sha: string }; + type GitGetCommitResponseTree = { url: string; sha: string }; + type GitGetCommitResponseCommitter = { + date: string; + name: string; + email: string; + }; + type GitGetCommitResponseAuthor = { + date: string; + name: string; + email: string; + }; + type GitGetCommitResponse = { + sha: string; + url: string; + author: GitGetCommitResponseAuthor; + committer: GitGetCommitResponseCommitter; + message: string; + tree: GitGetCommitResponseTree; + parents: Array; + verification: GitGetCommitResponseVerification; + }; + type GitCreateBlobResponse = { url: string; sha: string }; + type GitGetBlobResponse = { + content: string; + encoding: string; + url: string; + sha: string; + size: number; + }; + type GistsDeleteCommentResponse = {}; + type GistsUpdateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsUpdateCommentResponse = { + id: number; + node_id: string; + url: string; + body: string; + user: GistsUpdateCommentResponseUser; + created_at: string; + updated_at: string; + }; + type GistsCreateCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsCreateCommentResponse = { + id: number; + node_id: string; + url: string; + body: string; + user: GistsCreateCommentResponseUser; + created_at: string; + updated_at: string; + }; + type GistsGetCommentResponseUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetCommentResponse = { + id: number; + node_id: string; + url: string; + body: string; + user: GistsGetCommentResponseUser; + created_at: string; + updated_at: string; + }; + type GistsListCommentsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListCommentsResponseItem = { + id: number; + node_id: string; + url: string; + body: string; + user: GistsListCommentsResponseItemUser; + created_at: string; + updated_at: string; + }; + type GistsDeleteResponse = {}; + type GistsListForksResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListForksResponseItem = { + user: GistsListForksResponseItemUser; + url: string; + id: string; + created_at: string; + updated_at: string; + }; + type GistsForkResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsForkResponseFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + }; + type GistsForkResponseFiles = { + "hello_world.rb": GistsForkResponseFilesHelloWorldRb; + }; + type GistsForkResponse = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsForkResponseFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsForkResponseOwner; + truncated: boolean; + }; + type GistsUnstarResponse = {}; + type GistsStarResponse = {}; + type GistsListCommitsResponseItemChangeStatus = { + deletions: number; + additions: number; + total: number; + }; + type GistsListCommitsResponseItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListCommitsResponseItem = { + url: string; + version: string; + user: GistsListCommitsResponseItemUser; + change_status: GistsListCommitsResponseItemChangeStatus; + committed_at: string; + }; + type GistsUpdateResponseHistoryItemChangeStatus = { + deletions: number; + additions: number; + total: number; + }; + type GistsUpdateResponseHistoryItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsUpdateResponseHistoryItem = { + url: string; + version: string; + user: GistsUpdateResponseHistoryItemUser; + change_status: GistsUpdateResponseHistoryItemChangeStatus; + committed_at: string; + }; + type GistsUpdateResponseForksItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsUpdateResponseForksItem = { + user: GistsUpdateResponseForksItemUser; + url: string; + id: string; + created_at: string; + updated_at: string; + }; + type GistsUpdateResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsUpdateResponseFilesNewFileTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsUpdateResponseFilesHelloWorldMd = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsUpdateResponseFilesHelloWorldPy = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsUpdateResponseFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsUpdateResponseFiles = { + "hello_world.rb": GistsUpdateResponseFilesHelloWorldRb; + "hello_world.py": GistsUpdateResponseFilesHelloWorldPy; + "hello_world.md": GistsUpdateResponseFilesHelloWorldMd; + "new_file.txt": GistsUpdateResponseFilesNewFileTxt; + }; + type GistsUpdateResponse = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsUpdateResponseFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsUpdateResponseOwner; + truncated: boolean; + forks: Array; + history: Array; + }; + type GistsCreateResponseHistoryItemChangeStatus = { + deletions: number; + additions: number; + total: number; + }; + type GistsCreateResponseHistoryItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsCreateResponseHistoryItem = { + url: string; + version: string; + user: GistsCreateResponseHistoryItemUser; + change_status: GistsCreateResponseHistoryItemChangeStatus; + committed_at: string; + }; + type GistsCreateResponseForksItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsCreateResponseForksItem = { + user: GistsCreateResponseForksItemUser; + url: string; + id: string; + created_at: string; + updated_at: string; + }; + type GistsCreateResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsCreateResponseFilesHelloWorldPythonTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsCreateResponseFilesHelloWorldRubyTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsCreateResponseFilesHelloWorldPy = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsCreateResponseFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsCreateResponseFiles = { + "hello_world.rb": GistsCreateResponseFilesHelloWorldRb; + "hello_world.py": GistsCreateResponseFilesHelloWorldPy; + "hello_world_ruby.txt": GistsCreateResponseFilesHelloWorldRubyTxt; + "hello_world_python.txt": GistsCreateResponseFilesHelloWorldPythonTxt; + }; + type GistsCreateResponse = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsCreateResponseFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsCreateResponseOwner; + truncated: boolean; + forks: Array; + history: Array; + }; + type GistsGetRevisionResponseHistoryItemChangeStatus = { + deletions: number; + additions: number; + total: number; + }; + type GistsGetRevisionResponseHistoryItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetRevisionResponseHistoryItem = { + url: string; + version: string; + user: GistsGetRevisionResponseHistoryItemUser; + change_status: GistsGetRevisionResponseHistoryItemChangeStatus; + committed_at: string; + }; + type GistsGetRevisionResponseForksItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetRevisionResponseForksItem = { + user: GistsGetRevisionResponseForksItemUser; + url: string; + id: string; + created_at: string; + updated_at: string; + }; + type GistsGetRevisionResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetRevisionResponseFilesHelloWorldPythonTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetRevisionResponseFilesHelloWorldRubyTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetRevisionResponseFilesHelloWorldPy = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetRevisionResponseFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetRevisionResponseFiles = { + "hello_world.rb": GistsGetRevisionResponseFilesHelloWorldRb; + "hello_world.py": GistsGetRevisionResponseFilesHelloWorldPy; + "hello_world_ruby.txt": GistsGetRevisionResponseFilesHelloWorldRubyTxt; + "hello_world_python.txt": GistsGetRevisionResponseFilesHelloWorldPythonTxt; + }; + type GistsGetRevisionResponse = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsGetRevisionResponseFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsGetRevisionResponseOwner; + truncated: boolean; + forks: Array; + history: Array; + }; + type GistsGetResponseHistoryItemChangeStatus = { + deletions: number; + additions: number; + total: number; + }; + type GistsGetResponseHistoryItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetResponseHistoryItem = { + url: string; + version: string; + user: GistsGetResponseHistoryItemUser; + change_status: GistsGetResponseHistoryItemChangeStatus; + committed_at: string; + }; + type GistsGetResponseForksItemUser = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetResponseForksItem = { + user: GistsGetResponseForksItemUser; + url: string; + id: string; + created_at: string; + updated_at: string; + }; + type GistsGetResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsGetResponseFilesHelloWorldPythonTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetResponseFilesHelloWorldRubyTxt = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetResponseFilesHelloWorldPy = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetResponseFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + truncated: boolean; + content: string; + }; + type GistsGetResponseFiles = { + "hello_world.rb": GistsGetResponseFilesHelloWorldRb; + "hello_world.py": GistsGetResponseFilesHelloWorldPy; + "hello_world_ruby.txt": GistsGetResponseFilesHelloWorldRubyTxt; + "hello_world_python.txt": GistsGetResponseFilesHelloWorldPythonTxt; + }; + type GistsGetResponse = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsGetResponseFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsGetResponseOwner; + truncated: boolean; + forks: Array; + history: Array; + }; + type GistsListStarredResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListStarredResponseItemFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + }; + type GistsListStarredResponseItemFiles = { + "hello_world.rb": GistsListStarredResponseItemFilesHelloWorldRb; + }; + type GistsListStarredResponseItem = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsListStarredResponseItemFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsListStarredResponseItemOwner; + truncated: boolean; + }; + type GistsListPublicResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListPublicResponseItemFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + }; + type GistsListPublicResponseItemFiles = { + "hello_world.rb": GistsListPublicResponseItemFilesHelloWorldRb; + }; + type GistsListPublicResponseItem = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsListPublicResponseItemFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsListPublicResponseItemOwner; + truncated: boolean; + }; + type GistsListResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListResponseItemFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + }; + type GistsListResponseItemFiles = { + "hello_world.rb": GistsListResponseItemFilesHelloWorldRb; + }; + type GistsListResponseItem = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsListResponseItemFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsListResponseItemOwner; + truncated: boolean; + }; + type GistsListPublicForUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type GistsListPublicForUserResponseItemFilesHelloWorldRb = { + filename: string; + type: string; + language: string; + raw_url: string; + size: number; + }; + type GistsListPublicForUserResponseItemFiles = { + "hello_world.rb": GistsListPublicForUserResponseItemFilesHelloWorldRb; + }; + type GistsListPublicForUserResponseItem = { + url: string; + forks_url: string; + commits_url: string; + id: string; + node_id: string; + git_pull_url: string; + git_push_url: string; + html_url: string; + files: GistsListPublicForUserResponseItemFiles; + public: boolean; + created_at: string; + updated_at: string; + description: string; + comments: number; + user: null; + comments_url: string; + owner: GistsListPublicForUserResponseItemOwner; + truncated: boolean; + }; + type EmojisGetResponse = {}; + type CodesOfConductGetForRepoResponse = { + key: string; + name: string; + url: string; + body: string; + }; + type CodesOfConductGetConductCodeResponse = { + key: string; + name: string; + url: string; + body: string; + }; + type CodesOfConductListConductCodesResponseItem = { + key: string; + name: string; + url: string; + }; + type ChecksRerequestSuiteResponse = {}; + type ChecksCreateSuiteResponseRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ChecksCreateSuiteResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ChecksCreateSuiteResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ChecksCreateSuiteResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ChecksCreateSuiteResponseRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ChecksCreateSuiteResponseAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksCreateSuiteResponseApp = { + id: number; + node_id: string; + owner: ChecksCreateSuiteResponseAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksCreateSuiteResponse = { + id: number; + node_id: string; + head_branch: string; + head_sha: string; + status: string; + conclusion: string; + url: string; + before: string; + after: string; + pull_requests: Array; + app: ChecksCreateSuiteResponseApp; + repository: ChecksCreateSuiteResponseRepository; + }; + type ChecksSetSuitesPreferencesResponseRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ChecksSetSuitesPreferencesResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ChecksSetSuitesPreferencesResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ChecksSetSuitesPreferencesResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ChecksSetSuitesPreferencesResponseRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem = { + app_id: number; + setting: boolean; + }; + type ChecksSetSuitesPreferencesResponsePreferences = { + auto_trigger_checks: Array< + ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem + >; + }; + type ChecksSetSuitesPreferencesResponse = { + preferences: ChecksSetSuitesPreferencesResponsePreferences; + repository: ChecksSetSuitesPreferencesResponseRepository; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItemApp = { + id: number; + node_id: string; + owner: ChecksListSuitesForRefResponseCheckSuitesItemAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksListSuitesForRefResponseCheckSuitesItem = { + id: number; + node_id: string; + head_branch: string; + head_sha: string; + status: string; + conclusion: string; + url: string; + before: string; + after: string; + pull_requests: Array; + app: ChecksListSuitesForRefResponseCheckSuitesItemApp; + repository: ChecksListSuitesForRefResponseCheckSuitesItemRepository; + }; + type ChecksListSuitesForRefResponse = { + total_count: number; + check_suites: Array; + }; + type ChecksGetSuiteResponseRepositoryPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ChecksGetSuiteResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ChecksGetSuiteResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ChecksGetSuiteResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ChecksGetSuiteResponseRepositoryPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ChecksGetSuiteResponseAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksGetSuiteResponseApp = { + id: number; + node_id: string; + owner: ChecksGetSuiteResponseAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksGetSuiteResponse = { + id: number; + node_id: string; + head_branch: string; + head_sha: string; + status: string; + conclusion: string; + url: string; + before: string; + after: string; + pull_requests: Array; + app: ChecksGetSuiteResponseApp; + repository: ChecksGetSuiteResponseRepository; + }; + type ChecksListAnnotationsResponseItem = { + path: string; + start_line: number; + end_line: number; + start_column: number; + end_column: number; + annotation_level: string; + title: string; + message: string; + raw_details: string; + }; + type ChecksGetResponsePullRequestsItemBaseRepo = { + id: number; + url: string; + name: string; + }; + type ChecksGetResponsePullRequestsItemBase = { + ref: string; + sha: string; + repo: ChecksGetResponsePullRequestsItemBaseRepo; + }; + type ChecksGetResponsePullRequestsItemHeadRepo = { + id: number; + url: string; + name: string; + }; + type ChecksGetResponsePullRequestsItemHead = { + ref: string; + sha: string; + repo: ChecksGetResponsePullRequestsItemHeadRepo; + }; + type ChecksGetResponsePullRequestsItem = { + url: string; + id: number; + number: number; + head: ChecksGetResponsePullRequestsItemHead; + base: ChecksGetResponsePullRequestsItemBase; + }; + type ChecksGetResponseAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksGetResponseApp = { + id: number; + node_id: string; + owner: ChecksGetResponseAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksGetResponseCheckSuite = { id: number }; + type ChecksGetResponseOutput = { + title: string; + summary: string; + text: string; + annotations_count: number; + annotations_url: string; + }; + type ChecksGetResponse = { + id: number; + head_sha: string; + node_id: string; + external_id: string; + url: string; + html_url: string; + details_url: string; + status: string; + conclusion: string; + started_at: string; + completed_at: string; + output: ChecksGetResponseOutput; + name: string; + check_suite: ChecksGetResponseCheckSuite; + app: ChecksGetResponseApp; + pull_requests: Array; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + url: string; + name: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + sha: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + url: string; + name: string; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + sha: string; + repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo; + }; + type ChecksListForSuiteResponseCheckRunsItemPullRequestsItem = { + url: string; + id: number; + number: number; + head: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead; + base: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase; + }; + type ChecksListForSuiteResponseCheckRunsItemAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksListForSuiteResponseCheckRunsItemApp = { + id: number; + node_id: string; + owner: ChecksListForSuiteResponseCheckRunsItemAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksListForSuiteResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForSuiteResponseCheckRunsItemOutput = { + title: string; + summary: string; + text: string; + annotations_count: number; + annotations_url: string; + }; + type ChecksListForSuiteResponseCheckRunsItem = { + id: number; + head_sha: string; + node_id: string; + external_id: string; + url: string; + html_url: string; + details_url: string; + status: string; + conclusion: string; + started_at: string; + completed_at: string; + output: ChecksListForSuiteResponseCheckRunsItemOutput; + name: string; + check_suite: ChecksListForSuiteResponseCheckRunsItemCheckSuite; + app: ChecksListForSuiteResponseCheckRunsItemApp; + pull_requests: Array< + ChecksListForSuiteResponseCheckRunsItemPullRequestsItem + >; + }; + type ChecksListForSuiteResponse = { + total_count: number; + check_runs: Array; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo = { + id: number; + url: string; + name: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemBase = { + ref: string; + sha: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo = { + id: number; + url: string; + name: string; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItemHead = { + ref: string; + sha: string; + repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo; + }; + type ChecksListForRefResponseCheckRunsItemPullRequestsItem = { + url: string; + id: number; + number: number; + head: ChecksListForRefResponseCheckRunsItemPullRequestsItemHead; + base: ChecksListForRefResponseCheckRunsItemPullRequestsItemBase; + }; + type ChecksListForRefResponseCheckRunsItemAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksListForRefResponseCheckRunsItemApp = { + id: number; + node_id: string; + owner: ChecksListForRefResponseCheckRunsItemAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksListForRefResponseCheckRunsItemCheckSuite = { id: number }; + type ChecksListForRefResponseCheckRunsItemOutput = { + title: string; + summary: string; + text: string; + annotations_count: number; + annotations_url: string; + }; + type ChecksListForRefResponseCheckRunsItem = { + id: number; + head_sha: string; + node_id: string; + external_id: string; + url: string; + html_url: string; + details_url: string; + status: string; + conclusion: string; + started_at: string; + completed_at: string; + output: ChecksListForRefResponseCheckRunsItemOutput; + name: string; + check_suite: ChecksListForRefResponseCheckRunsItemCheckSuite; + app: ChecksListForRefResponseCheckRunsItemApp; + pull_requests: Array; + }; + type ChecksListForRefResponse = { + total_count: number; + check_runs: Array; + }; + type ChecksUpdateResponsePullRequestsItemBaseRepo = { + id: number; + url: string; + name: string; + }; + type ChecksUpdateResponsePullRequestsItemBase = { + ref: string; + sha: string; + repo: ChecksUpdateResponsePullRequestsItemBaseRepo; + }; + type ChecksUpdateResponsePullRequestsItemHeadRepo = { + id: number; + url: string; + name: string; + }; + type ChecksUpdateResponsePullRequestsItemHead = { + ref: string; + sha: string; + repo: ChecksUpdateResponsePullRequestsItemHeadRepo; + }; + type ChecksUpdateResponsePullRequestsItem = { + url: string; + id: number; + number: number; + head: ChecksUpdateResponsePullRequestsItemHead; + base: ChecksUpdateResponsePullRequestsItemBase; + }; + type ChecksUpdateResponseAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksUpdateResponseApp = { + id: number; + node_id: string; + owner: ChecksUpdateResponseAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksUpdateResponseCheckSuite = { id: number }; + type ChecksUpdateResponseOutput = { + title: string; + summary: string; + text: string; + annotations_count: number; + annotations_url: string; + }; + type ChecksUpdateResponse = { + id: number; + head_sha: string; + node_id: string; + external_id: string; + url: string; + html_url: string; + details_url: string; + status: string; + conclusion: string; + started_at: string; + completed_at: string; + output: ChecksUpdateResponseOutput; + name: string; + check_suite: ChecksUpdateResponseCheckSuite; + app: ChecksUpdateResponseApp; + pull_requests: Array; + }; + type ChecksCreateResponsePullRequestsItemBaseRepo = { + id: number; + url: string; + name: string; + }; + type ChecksCreateResponsePullRequestsItemBase = { + ref: string; + sha: string; + repo: ChecksCreateResponsePullRequestsItemBaseRepo; + }; + type ChecksCreateResponsePullRequestsItemHeadRepo = { + id: number; + url: string; + name: string; + }; + type ChecksCreateResponsePullRequestsItemHead = { + ref: string; + sha: string; + repo: ChecksCreateResponsePullRequestsItemHeadRepo; + }; + type ChecksCreateResponsePullRequestsItem = { + url: string; + id: number; + number: number; + head: ChecksCreateResponsePullRequestsItemHead; + base: ChecksCreateResponsePullRequestsItemBase; + }; + type ChecksCreateResponseAppOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type ChecksCreateResponseApp = { + id: number; + node_id: string; + owner: ChecksCreateResponseAppOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ChecksCreateResponseCheckSuite = { id: number }; + type ChecksCreateResponseOutput = { + title: string; + summary: string; + text: string; + }; + type ChecksCreateResponse = { + id: number; + head_sha: string; + node_id: string; + external_id: string; + url: string; + html_url: string; + details_url: string; + status: string; + conclusion: null; + started_at: string; + completed_at: null; + output: ChecksCreateResponseOutput; + name: string; + check_suite: ChecksCreateResponseCheckSuite; + app: ChecksCreateResponseApp; + pull_requests: Array; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount = { + login: string; + id: number; + url: string; + email: null; + organization_billing_email: string; + type: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + account: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount; + plan: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount = { + login: string; + id: number; + url: string; + email: null; + organization_billing_email: string; + type: string; + }; + type AppsListMarketplacePurchasesForAuthenticatedUserResponseItem = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + account: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount; + plan: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + state: string; + unit_name: null; + bullets: Array; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange = { + effective_date: string; + unit_count: null; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan; + }; + type AppsCheckAccountIsAssociatedWithAnyStubbedResponse = { + url: string; + type: string; + id: number; + login: string; + email: null; + organization_billing_email: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + state: string; + unit_name: null; + bullets: Array; + }; + type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange = { + effective_date: string; + unit_count: null; + id: number; + plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan; + }; + type AppsCheckAccountIsAssociatedWithAnyResponse = { + url: string; + type: string; + id: number; + login: string; + email: null; + organization_billing_email: string; + marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange; + marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + state: string; + unit_name: null; + bullets: Array; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange = { + effective_date: string; + unit_count: null; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan; + }; + type AppsListAccountsUserOrOrgOnPlanStubbedResponseItem = { + url: string; + type: string; + id: number; + login: string; + email: null; + organization_billing_email: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase = { + billing_cycle: string; + next_billing_date: string; + unit_count: null; + on_free_trial: boolean; + free_trial_ends_on: string; + updated_at: string; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + state: string; + unit_name: null; + bullets: Array; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange = { + effective_date: string; + unit_count: null; + id: number; + plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan; + }; + type AppsListAccountsUserOrOrgOnPlanResponseItem = { + url: string; + type: string; + id: number; + login: string; + email: null; + organization_billing_email: string; + marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange; + marketplace_purchase: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase; + }; + type AppsListPlansStubbedResponseItem = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsListPlansResponseItem = { + url: string; + accounts_url: string; + id: number; + number: number; + name: string; + description: string; + monthly_price_in_cents: number; + yearly_price_in_cents: number; + price_model: string; + has_free_trial: boolean; + unit_name: null; + state: string; + bullets: Array; + }; + type AppsCreateContentAttachmentResponse = { + id: number; + title: string; + body: string; + }; + type AppsRemoveRepoFromInstallationResponse = {}; + type AppsAddRepoToInstallationResponse = {}; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type AppsListInstallationReposForAuthenticatedUserResponse = { + total_count: number; + repositories: Array< + AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem + >; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions = { + metadata: string; + contents: string; + issues: string; + single_file: string; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url?: string; + issues_url?: string; + members_url?: string; + public_members_url?: string; + avatar_url: string; + description?: string; + gravatar_id?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + type AppsListInstallationsForAuthenticatedUserResponseInstallationsItem = { + id: number; + account: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions; + events: Array; + single_file_name: string; + }; + type AppsListInstallationsForAuthenticatedUserResponse = { + total_count: number; + installations: Array< + AppsListInstallationsForAuthenticatedUserResponseInstallationsItem + >; + }; + type AppsListReposResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsListReposResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: AppsListReposResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type AppsListReposResponse = { + total_count: number; + repositories: Array; + }; + type AppsCreateFromManifestResponseOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsCreateFromManifestResponse = { + id: number; + node_id: string; + owner: AppsCreateFromManifestResponseOwner; + name: string; + description: null; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + client_id: string; + client_secret: string; + webhook_secret: string; + pem: string; + }; + type AppsFindUserInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsFindUserInstallationResponseAccount = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsFindUserInstallationResponse = { + id: number; + account: AppsFindUserInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsFindUserInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsGetUserInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsGetUserInstallationResponseAccount = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsGetUserInstallationResponse = { + id: number; + account: AppsGetUserInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsGetUserInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsFindRepoInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsFindRepoInstallationResponseAccount = { + login: string; + id: number; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsFindRepoInstallationResponse = { + id: number; + account: AppsFindRepoInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsFindRepoInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsGetRepoInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsGetRepoInstallationResponseAccount = { + login: string; + id: number; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsGetRepoInstallationResponse = { + id: number; + account: AppsGetRepoInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsGetRepoInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsFindOrgInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsFindOrgInstallationResponseAccount = { + login: string; + id: number; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsFindOrgInstallationResponse = { + id: number; + account: AppsFindOrgInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsFindOrgInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsGetOrgInstallationResponsePermissions = { + checks: string; + metadata: string; + contents: string; + }; + type AppsGetOrgInstallationResponseAccount = { + login: string; + id: number; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsGetOrgInstallationResponse = { + id: number; + account: AppsGetOrgInstallationResponseAccount; + repository_selection: string; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsGetOrgInstallationResponsePermissions; + events: Array; + created_at: string; + updated_at: string; + single_file_name: null; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type AppsCreateInstallationTokenResponseRepositoriesItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type AppsCreateInstallationTokenResponseRepositoriesItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: AppsCreateInstallationTokenResponseRepositoriesItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: AppsCreateInstallationTokenResponseRepositoriesItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type AppsCreateInstallationTokenResponsePermissions = { + issues: string; + contents: string; + }; + type AppsCreateInstallationTokenResponse = { + token: string; + expires_at: string; + permissions: AppsCreateInstallationTokenResponsePermissions; + repositories: Array; + }; + type AppsDeleteInstallationResponse = {}; + type AppsGetInstallationResponsePermissions = { + metadata: string; + contents: string; + issues: string; + single_file: string; + }; + type AppsGetInstallationResponseAccount = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type AppsGetInstallationResponse = { + id: number; + account: AppsGetInstallationResponseAccount; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsGetInstallationResponsePermissions; + events: Array; + single_file_name: string; + repository_selection: string; + }; + type AppsListInstallationsResponseItemPermissions = { + metadata: string; + contents: string; + issues: string; + single_file: string; + }; + type AppsListInstallationsResponseItemAccount = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type AppsListInstallationsResponseItem = { + id: number; + account: AppsListInstallationsResponseItemAccount; + access_tokens_url: string; + repositories_url: string; + html_url: string; + app_id: number; + target_id: number; + target_type: string; + permissions: AppsListInstallationsResponseItemPermissions; + events: Array; + single_file_name: string; + repository_selection: string; + }; + type AppsGetAuthenticatedResponseOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type AppsGetAuthenticatedResponse = { + id: number; + node_id: string; + owner: AppsGetAuthenticatedResponseOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + installations_count: number; + }; + type AppsGetBySlugResponseOwner = { + login: string; + id: number; + node_id: string; + url: string; + repos_url: string; + events_url: string; + hooks_url: string; + issues_url: string; + members_url: string; + public_members_url: string; + avatar_url: string; + description: string; + }; + type AppsGetBySlugResponse = { + id: number; + node_id: string; + owner: AppsGetBySlugResponseOwner; + name: string; + description: string; + external_url: string; + html_url: string; + created_at: string; + updated_at: string; + }; + type ActivityDeleteRepoSubscriptionResponse = {}; + type ActivitySetRepoSubscriptionResponse = { + subscribed: boolean; + ignored: boolean; + reason: null; + created_at: string; + url: string; + repository_url: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListWatchedReposForAuthenticatedUserResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListWatchedReposForAuthenticatedUserResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions; + template_repository: null; + subscribers_count: number; + network_count: number; + license: ActivityListWatchedReposForAuthenticatedUserResponseItemLicense; + }; + type ActivityListReposWatchedByUserResponseItemLicense = { + key: string; + name: string; + spdx_id: string; + url: string; + node_id: string; + }; + type ActivityListReposWatchedByUserResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ActivityListReposWatchedByUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListReposWatchedByUserResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListReposWatchedByUserResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ActivityListReposWatchedByUserResponseItemPermissions; + template_repository: null; + subscribers_count: number; + network_count: number; + license: ActivityListReposWatchedByUserResponseItemLicense; + }; + type ActivityListWatchersForRepoResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityUnstarRepoResponse = {}; + type ActivityStarRepoResponse = {}; + type ActivityListReposStarredByAuthenticatedUserResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListReposStarredByAuthenticatedUserResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListReposStarredByAuthenticatedUserResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ActivityListReposStarredByAuthenticatedUserResponseItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ActivityListReposStarredByUserResponseItemPermissions = { + admin: boolean; + push: boolean; + pull: boolean; + }; + type ActivityListReposStarredByUserResponseItemOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListReposStarredByUserResponseItem = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListReposStarredByUserResponseItemOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + clone_url: string; + mirror_url: string; + hooks_url: string; + svn_url: string; + homepage: string; + language: null; + forks_count: number; + stargazers_count: number; + watchers_count: number; + size: number; + default_branch: string; + open_issues_count: number; + is_template: boolean; + topics: Array; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + has_downloads: boolean; + archived: boolean; + disabled: boolean; + pushed_at: string; + created_at: string; + updated_at: string; + permissions: ActivityListReposStarredByUserResponseItemPermissions; + allow_rebase_merge: boolean; + template_repository: null; + allow_squash_merge: boolean; + allow_merge_commit: boolean; + subscribers_count: number; + network_count: number; + }; + type ActivityListStargazersForRepoResponseItem = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityDeleteThreadSubscriptionResponse = {}; + type ActivitySetThreadSubscriptionResponse = { + subscribed: boolean; + ignored: boolean; + reason: null; + created_at: string; + url: string; + thread_url: string; + }; + type ActivityGetThreadSubscriptionResponse = { + subscribed: boolean; + ignored: boolean; + reason: null; + created_at: string; + url: string; + thread_url: string; + }; + type ActivityMarkThreadAsReadResponse = {}; + type ActivityGetThreadResponseSubject = { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + type ActivityGetThreadResponseRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityGetThreadResponseRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityGetThreadResponseRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ActivityGetThreadResponse = { + id: string; + repository: ActivityGetThreadResponseRepository; + subject: ActivityGetThreadResponseSubject; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string; + url: string; + }; + type ActivityMarkNotificationsAsReadForRepoResponse = {}; + type ActivityMarkAsReadResponse = {}; + type ActivityListNotificationsForRepoResponseItemSubject = { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + type ActivityListNotificationsForRepoResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListNotificationsForRepoResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListNotificationsForRepoResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ActivityListNotificationsForRepoResponseItem = { + id: string; + repository: ActivityListNotificationsForRepoResponseItemRepository; + subject: ActivityListNotificationsForRepoResponseItemSubject; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string; + url: string; + }; + type ActivityListNotificationsResponseItemSubject = { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + type ActivityListNotificationsResponseItemRepositoryOwner = { + login: string; + id: number; + node_id: string; + avatar_url: string; + gravatar_id: string; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: boolean; + }; + type ActivityListNotificationsResponseItemRepository = { + id: number; + node_id: string; + name: string; + full_name: string; + owner: ActivityListNotificationsResponseItemRepositoryOwner; + private: boolean; + html_url: string; + description: string; + fork: boolean; + url: string; + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + downloads_url: string; + events_url: string; + forks_url: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + notifications_url: string; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + }; + type ActivityListNotificationsResponseItem = { + id: string; + repository: ActivityListNotificationsResponseItemRepository; + subject: ActivityListNotificationsResponseItemSubject; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string; + url: string; + }; + type ActivityListFeedsResponseLinksSecurityAdvisories = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganizationsItem = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserOrganization = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserActor = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUser = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksCurrentUserPublic = { + href: string; + type: string; + }; + type ActivityListFeedsResponseLinksUser = { href: string; type: string }; + type ActivityListFeedsResponseLinksTimeline = { href: string; type: string }; + type ActivityListFeedsResponseLinks = { + timeline: ActivityListFeedsResponseLinksTimeline; + user: ActivityListFeedsResponseLinksUser; + current_user_public: ActivityListFeedsResponseLinksCurrentUserPublic; + current_user: ActivityListFeedsResponseLinksCurrentUser; + current_user_actor: ActivityListFeedsResponseLinksCurrentUserActor; + current_user_organization: ActivityListFeedsResponseLinksCurrentUserOrganization; + current_user_organizations: Array< + ActivityListFeedsResponseLinksCurrentUserOrganizationsItem + >; + security_advisories: ActivityListFeedsResponseLinksSecurityAdvisories; + }; + type ActivityListFeedsResponse = { + timeline_url: string; + user_url: string; + current_user_public_url: string; + current_user_url: string; + current_user_actor_url: string; + current_user_organization_url: string; + current_user_organization_urls: Array; + security_advisories_url: string; + _links: ActivityListFeedsResponseLinks; + }; + type ActivityListNotificationsResponse = Array< + ActivityListNotificationsResponseItem + >; + type ActivityListNotificationsForRepoResponse = Array< + ActivityListNotificationsForRepoResponseItem + >; + type ActivityListStargazersForRepoResponse = Array< + ActivityListStargazersForRepoResponseItem + >; + type ActivityListReposStarredByUserResponse = Array< + ActivityListReposStarredByUserResponseItem + >; + type ActivityListReposStarredByAuthenticatedUserResponse = Array< + ActivityListReposStarredByAuthenticatedUserResponseItem + >; + type ActivityListWatchersForRepoResponse = Array< + ActivityListWatchersForRepoResponseItem + >; + type ActivityListReposWatchedByUserResponse = Array< + ActivityListReposWatchedByUserResponseItem + >; + type ActivityListWatchedReposForAuthenticatedUserResponse = Array< + ActivityListWatchedReposForAuthenticatedUserResponseItem + >; + type AppsListInstallationsResponse = Array; + type AppsListPlansResponse = Array; + type AppsListPlansStubbedResponse = Array; + type AppsListAccountsUserOrOrgOnPlanResponse = Array< + AppsListAccountsUserOrOrgOnPlanResponseItem + >; + type AppsListAccountsUserOrOrgOnPlanStubbedResponse = Array< + AppsListAccountsUserOrOrgOnPlanStubbedResponseItem + >; + type AppsListMarketplacePurchasesForAuthenticatedUserResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserResponseItem + >; + type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse = Array< + AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem + >; + type ChecksListAnnotationsResponse = Array; + type CodesOfConductListConductCodesResponse = Array< + CodesOfConductListConductCodesResponseItem + >; + type GistsListPublicForUserResponse = Array< + GistsListPublicForUserResponseItem + >; + type GistsListResponse = Array; + type GistsListPublicResponse = Array; + type GistsListStarredResponse = Array; + type GistsListCommitsResponse = Array; + type GistsListForksResponse = Array; + type GistsListCommentsResponse = Array; + type GitignoreListTemplatesResponse = Array; + type IssuesListResponse = Array; + type IssuesListForAuthenticatedUserResponse = Array< + IssuesListForAuthenticatedUserResponseItem + >; + type IssuesListForOrgResponse = Array; + type IssuesListForRepoResponse = Array; + type IssuesListAssigneesResponse = Array; + type IssuesListCommentsResponse = Array; + type IssuesListCommentsForRepoResponse = Array< + IssuesListCommentsForRepoResponseItem + >; + type IssuesListEventsResponse = Array; + type IssuesListEventsForRepoResponse = Array< + IssuesListEventsForRepoResponseItem + >; + type IssuesListLabelsForRepoResponse = Array< + IssuesListLabelsForRepoResponseItem + >; + type IssuesListLabelsOnIssueResponse = Array< + IssuesListLabelsOnIssueResponseItem + >; + type IssuesAddLabelsResponse = Array; + type IssuesRemoveLabelResponse = Array; + type IssuesReplaceLabelsResponse = Array; + type IssuesListLabelsForMilestoneResponse = Array< + IssuesListLabelsForMilestoneResponseItem + >; + type IssuesListMilestonesForRepoResponse = Array< + IssuesListMilestonesForRepoResponseItem + >; + type IssuesListEventsForTimelineResponse = Array< + IssuesListEventsForTimelineResponseItem + >; + type LicensesListCommonlyUsedResponse = Array< + LicensesListCommonlyUsedResponseItem + >; + type LicensesListResponse = Array; + type MigrationsListForOrgResponse = Array; + type MigrationsGetCommitAuthorsResponse = Array< + MigrationsGetCommitAuthorsResponseItem + >; + type MigrationsGetLargeFilesResponse = Array< + MigrationsGetLargeFilesResponseItem + >; + type MigrationsListForAuthenticatedUserResponse = Array< + MigrationsListForAuthenticatedUserResponseItem + >; + type OauthAuthorizationsListGrantsResponse = Array< + OauthAuthorizationsListGrantsResponseItem + >; + type OauthAuthorizationsListAuthorizationsResponse = Array< + OauthAuthorizationsListAuthorizationsResponseItem + >; + type OrgsListForAuthenticatedUserResponse = Array< + OrgsListForAuthenticatedUserResponseItem + >; + type OrgsListResponse = Array; + type OrgsListForUserResponse = Array; + type OrgsListBlockedUsersResponse = Array; + type OrgsListHooksResponse = Array; + type OrgsListMembersResponse = Array; + type OrgsListPublicMembersResponse = Array; + type OrgsListInvitationTeamsResponse = Array< + OrgsListInvitationTeamsResponseItem + >; + type OrgsListPendingInvitationsResponse = Array< + OrgsListPendingInvitationsResponseItem + >; + type OrgsListMembershipsResponse = Array; + type OrgsListOutsideCollaboratorsResponse = Array< + OrgsListOutsideCollaboratorsResponseItem + >; + type ProjectsListForRepoResponse = Array; + type ProjectsListForOrgResponse = Array; + type ProjectsListForUserResponse = Array; + type ProjectsListCardsResponse = Array; + type ProjectsListCollaboratorsResponse = Array< + ProjectsListCollaboratorsResponseItem + >; + type ProjectsListColumnsResponse = Array; + type PullsListResponse = Array; + type PullsListCommitsResponse = Array; + type PullsListFilesResponse = Array; + type PullsListCommentsResponse = Array; + type PullsListCommentsForRepoResponse = Array< + PullsListCommentsForRepoResponseItem + >; + type PullsListReviewsResponse = Array; + type PullsGetCommentsForReviewResponse = Array< + PullsGetCommentsForReviewResponseItem + >; + type ReactionsListForCommitCommentResponse = Array< + ReactionsListForCommitCommentResponseItem + >; + type ReactionsListForIssueResponse = Array; + type ReactionsListForIssueCommentResponse = Array< + ReactionsListForIssueCommentResponseItem + >; + type ReactionsListForPullRequestReviewCommentResponse = Array< + ReactionsListForPullRequestReviewCommentResponseItem + >; + type ReactionsListForTeamDiscussionResponse = Array< + ReactionsListForTeamDiscussionResponseItem + >; + type ReactionsListForTeamDiscussionCommentResponse = Array< + ReactionsListForTeamDiscussionCommentResponseItem + >; + type ReposListForOrgResponse = Array; + type ReposListPublicResponse = Array; + type ReposListTeamsResponse = Array; + type ReposListTagsResponse = Array; + type ReposListBranchesResponse = Array; + type ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposAddProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse = Array< + string + >; + type ReposListProtectedBranchTeamRestrictionsResponse = any; + type ReposReplaceProtectedBranchTeamRestrictionsResponse = Array< + ReposReplaceProtectedBranchTeamRestrictionsResponseItem + >; + type ReposAddProtectedBranchTeamRestrictionsResponse = Array< + ReposAddProtectedBranchTeamRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchTeamRestrictionsResponse = Array< + ReposRemoveProtectedBranchTeamRestrictionsResponseItem + >; + type ReposReplaceProtectedBranchUserRestrictionsResponse = Array< + ReposReplaceProtectedBranchUserRestrictionsResponseItem + >; + type ReposAddProtectedBranchUserRestrictionsResponse = Array< + ReposAddProtectedBranchUserRestrictionsResponseItem + >; + type ReposRemoveProtectedBranchUserRestrictionsResponse = Array< + ReposRemoveProtectedBranchUserRestrictionsResponseItem + >; + type ReposListCollaboratorsResponse = Array< + ReposListCollaboratorsResponseItem + >; + type ReposListCommitCommentsResponse = Array< + ReposListCommitCommentsResponseItem + >; + type ReposListCommentsForCommitResponse = Array< + ReposListCommentsForCommitResponseItem + >; + type ReposListCommitsResponse = Array; + type ReposCompareCommitsResponse = any; + type ReposListBranchesForHeadCommitResponse = Array< + ReposListBranchesForHeadCommitResponseItem + >; + type ReposListPullRequestsAssociatedWithCommitResponse = Array< + ReposListPullRequestsAssociatedWithCommitResponseItem + >; + type ReposListDeploymentsResponse = Array; + type ReposListDeploymentStatusesResponse = Array< + ReposListDeploymentStatusesResponseItem + >; + type ReposListDownloadsResponse = Array; + type ReposListForksResponse = Array; + type ReposListHooksResponse = Array; + type ReposListInvitationsResponse = Array; + type ReposListInvitationsForAuthenticatedUserResponse = Array< + ReposListInvitationsForAuthenticatedUserResponseItem + >; + type ReposListDeployKeysResponse = Array; + type ReposListPagesBuildsResponse = Array; + type ReposListReleasesResponse = Array; + type ReposListAssetsForReleaseResponse = Array< + ReposListAssetsForReleaseResponseItem + >; + type ReposGetContributorsStatsResponse = Array< + ReposGetContributorsStatsResponseItem + >; + type ReposGetCommitActivityStatsResponse = Array< + ReposGetCommitActivityStatsResponseItem + >; + type ReposGetCodeFrequencyStatsResponse = Array>; + type ReposGetPunchCardStatsResponse = Array>; + type ReposListStatusesForRefResponse = Array< + ReposListStatusesForRefResponseItem + >; + type ReposGetTopReferrersResponse = Array; + type ReposGetTopPathsResponse = Array; + type TeamsListResponse = Array; + type TeamsListReposResponse = Array; + type TeamsListForAuthenticatedUserResponse = Array< + TeamsListForAuthenticatedUserResponseItem + >; + type TeamsListProjectsResponse = Array; + type TeamsListDiscussionCommentsResponse = Array< + TeamsListDiscussionCommentsResponseItem + >; + type TeamsListDiscussionsResponse = Array; + type TeamsListMembersResponse = Array; + type TeamsListPendingInvitationsResponse = Array< + TeamsListPendingInvitationsResponseItem + >; + type UsersGetContextForUserResponse = any; + type UsersListResponse = Array; + type UsersListBlockedResponse = Array; + type UsersListEmailsResponse = Array; + type UsersListPublicEmailsResponse = Array; + type UsersAddEmailsResponse = Array; + type UsersTogglePrimaryEmailVisibilityResponse = Array< + UsersTogglePrimaryEmailVisibilityResponseItem + >; + type UsersListFollowersForUserResponse = Array< + UsersListFollowersForUserResponseItem + >; + type UsersListFollowersForAuthenticatedUserResponse = Array< + UsersListFollowersForAuthenticatedUserResponseItem + >; + type UsersListFollowingForUserResponse = Array< + UsersListFollowingForUserResponseItem + >; + type UsersListFollowingForAuthenticatedUserResponse = Array< + UsersListFollowingForAuthenticatedUserResponseItem + >; + type UsersListGpgKeysForUserResponse = Array< + UsersListGpgKeysForUserResponseItem + >; + type UsersListGpgKeysResponse = Array; + type UsersListPublicKeysForUserResponse = Array< + UsersListPublicKeysForUserResponseItem + >; + type UsersListPublicKeysResponse = Array; + + export type ActivityListPublicEventsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListRepoEventsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListPublicEventsForRepoNetworkParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListPublicEventsForOrgParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListReceivedEventsForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListReceivedPublicEventsForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListEventsForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListPublicEventsForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListEventsForOrgParams = { + username: string; + + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListNotificationsParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListNotificationsForRepoParams = { + owner: string; + + repo: string; + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityMarkAsReadParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + last_read_at?: string; + }; + export type ActivityMarkNotificationsAsReadForRepoParams = { + owner: string; + + repo: string; + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + last_read_at?: string; + }; + export type ActivityGetThreadParams = { + thread_id: number; + }; + export type ActivityMarkThreadAsReadParams = { + thread_id: number; + }; + export type ActivityGetThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivitySetThreadSubscriptionParams = { + thread_id: number; + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; + }; + export type ActivityDeleteThreadSubscriptionParams = { + thread_id: number; + }; + export type ActivityListStargazersForRepoParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListReposStarredByUserParams = { + username: string; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListReposStarredByAuthenticatedUserParams = { + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityCheckStarringRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityStarRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityUnstarRepoParams = { + owner: string; + + repo: string; + }; + export type ActivityListWatchersForRepoParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListReposWatchedByUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityListWatchedReposForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ActivityGetRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type ActivitySetRepoSubscriptionParams = { + owner: string; + + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; + }; + export type ActivityDeleteRepoSubscriptionParams = { + owner: string; + + repo: string; + }; + export type AppsGetBySlugParams = { + app_slug: string; + }; + export type AppsListInstallationsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsGetInstallationParams = { + installation_id: number; + }; + export type AppsDeleteInstallationParams = { + installation_id: number; + }; + export type AppsCreateInstallationTokenParams = { + installation_id: number; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; + }; + export type AppsGetOrgInstallationParams = { + org: string; + }; + export type AppsFindOrgInstallationParams = { + org: string; + }; + export type AppsGetRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsFindRepoInstallationParams = { + owner: string; + + repo: string; + }; + export type AppsGetUserInstallationParams = { + username: string; + }; + export type AppsFindUserInstallationParams = { + username: string; + }; + export type AppsCreateFromManifestParams = { + code: string; + }; + export type AppsListReposParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListInstallationsForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListInstallationReposForAuthenticatedUserParams = { + installation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsAddRepoToInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsRemoveRepoFromInstallationParams = { + installation_id: number; + + repository_id: number; + }; + export type AppsCreateContentAttachmentParams = { + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; + }; + export type AppsListPlansParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListPlansStubbedParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListAccountsUserOrOrgOnPlanParams = { + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListAccountsUserOrOrgOnPlanStubbedParams = { + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyParams = { + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { + account_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ChecksCreateParams = { + owner: string; + + repo: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + /** + * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; + }; + export type ChecksUpdateParams = { + owner: string; + + repo: string; + + check_run_id: number; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + /** + * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. + */ + actions?: ChecksUpdateParamsActions[]; + }; + export type ChecksListForRefParams = { + owner: string; + + repo: string; + + ref: string; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ChecksListForSuiteParams = { + owner: string; + + repo: string; + + check_suite_id: number; + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ChecksGetParams = { + owner: string; + + repo: string; + + check_run_id: number; + }; + export type ChecksListAnnotationsParams = { + owner: string; + + repo: string; + + check_run_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ChecksGetSuiteParams = { + owner: string; + + repo: string; + + check_suite_id: number; + }; + export type ChecksListSuitesForRefParams = { + owner: string; + + repo: string; + + ref: string; + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ChecksSetSuitesPreferencesParams = { + owner: string; + + repo: string; + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; + }; + export type ChecksCreateSuiteParams = { + owner: string; + + repo: string; + /** + * The sha of the head commit. + */ + head_sha: string; + }; + export type ChecksRerequestSuiteParams = { + owner: string; + + repo: string; + + check_suite_id: number; + }; + export type CodesOfConductGetConductCodeParams = { + key: string; + }; + export type CodesOfConductGetForRepoParams = { + owner: string; + + repo: string; + }; + export type GistsListPublicForUserParams = { + username: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsListParams = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsListPublicParams = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsListStarredParams = { + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsGetParams = { + gist_id: string; + }; + export type GistsGetRevisionParams = { + gist_id: string; + + sha: string; + }; + export type GistsCreateParams = { + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; + }; + export type GistsUpdateParams = { + gist_id: string; + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; + }; + export type GistsListCommitsParams = { + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsStarParams = { + gist_id: string; + }; + export type GistsUnstarParams = { + gist_id: string; + }; + export type GistsCheckIsStarredParams = { + gist_id: string; + }; + export type GistsForkParams = { + gist_id: string; + }; + export type GistsListForksParams = { + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsDeleteParams = { + gist_id: string; + }; + export type GistsListCommentsParams = { + gist_id: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GistsGetCommentParams = { + gist_id: string; + + comment_id: number; + }; + export type GistsCreateCommentParams = { + gist_id: string; + /** + * The comment text. + */ + body: string; + }; + export type GistsUpdateCommentParams = { + gist_id: string; + + comment_id: number; + /** + * The comment text. + */ + body: string; + }; + export type GistsDeleteCommentParams = { + gist_id: string; + + comment_id: number; + }; + export type GitGetBlobParams = { + owner: string; + + repo: string; + + file_sha: string; + }; + export type GitCreateBlobParams = { + owner: string; + + repo: string; + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; + }; + export type GitGetCommitParams = { + owner: string; + + repo: string; + + commit_sha: string; + }; + export type GitCreateCommitParams = { + owner: string; + + repo: string; + /** + * The commit message + */ + message: string; + /** + * The SHA of the tree object this commit points to + */ + tree: string; + /** + * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + */ + parents: string[]; + /** + * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + */ + author?: GitCreateCommitParamsAuthor; + /** + * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + */ + committer?: GitCreateCommitParamsCommitter; + /** + * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. + */ + signature?: string; + }; + export type GitGetRefParams = { + owner: string; + + repo: string; + /** + * Must be formatted as `heads/branch`, not just `branch` + */ + ref: string; + }; + export type GitListRefsParams = { + owner: string; + + repo: string; + /** + * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags + */ + namespace?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type GitCreateRefParams = { + owner: string; + + repo: string; + /** + * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. + */ + ref: string; + /** + * The SHA1 value for this reference. + */ + sha: string; + }; + export type GitUpdateRefParams = { + owner: string; + + repo: string; + + ref: string; + /** + * The SHA1 value to set this reference to + */ + sha: string; + /** + * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + */ + force?: boolean; + }; + export type GitDeleteRefParams = { + owner: string; + + repo: string; + + ref: string; + }; + export type GitGetTagParams = { + owner: string; + + repo: string; + + tag_sha: string; + }; + export type GitCreateTagParams = { + owner: string; + + repo: string; + /** + * The tag's name. This is typically a version (e.g., "v0.0.1"). + */ + tag: string; + /** + * The tag message. + */ + message: string; + /** + * The SHA of the git object this is tagging. + */ + object: string; + /** + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + */ + type: "commit" | "tree" | "blob"; + /** + * An object with information about the individual creating the tag. + */ + tagger?: GitCreateTagParamsTagger; + }; + export type GitGetTreeParams = { + owner: string; + + repo: string; + + tree_sha: string; + + recursive?: 1; + }; + export type GitCreateTreeParams = { + owner: string; + + repo: string; + /** + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + */ + tree: GitCreateTreeParamsTree[]; + /** + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + */ + base_tree?: string; + }; + export type GitignoreGetTemplateParams = { + name: string; + }; + export type InteractionsGetRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsAddOrUpdateRestrictionsForOrgParams = { + org: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + }; + export type InteractionsRemoveRestrictionsForOrgParams = { + org: string; + }; + export type InteractionsGetRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type InteractionsAddOrUpdateRestrictionsForRepoParams = { + owner: string; + + repo: string; + /** + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + */ + limit: "existing_users" | "contributors_only" | "collaborators_only"; + }; + export type InteractionsRemoveRestrictionsForRepoParams = { + owner: string; + + repo: string; + }; + export type IssuesListParams = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListForAuthenticatedUserParams = { + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListForOrgParams = { + org: string; + /** + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation + */ + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListForRepoParams = { + owner: string; + + repo: string; + /** + * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + */ + milestone?: string; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. + */ + assignee?: string; + /** + * The user that created the issue. + */ + creator?: string; + /** + * A user that's mentioned in the issue. + */ + mentioned?: string; + /** + * A list of comma separated label names. Example: `bug,ui,@high` + */ + labels?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesGetParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesGetParams = { + owner: string; + + repo: string; + + issue_number: number; + }; + export type IssuesCreateParams = { + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + */ + assignee?: string; + /** + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + */ + milestone?: number; + /** + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + }; + export type IssuesUpdateParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The title of the issue. + */ + title?: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + */ + assignee?: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesUpdateParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The title of the issue. + */ + title?: string; + /** + * The contents of the issue. + */ + body?: string; + /** + * Login for the user that this issue should be assigned to. **This field is deprecated.** + */ + assignee?: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + */ + milestone?: number | null; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + */ + labels?: string[]; + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + }; + export type IssuesLockParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesLockParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + */ + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + }; + export type IssuesUnlockParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesUnlockParams = { + owner: string; + + repo: string; + + issue_number: number; + }; + export type IssuesListAssigneesParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesCheckAssigneeParams = { + owner: string; + + repo: string; + + assignee: string; + }; + export type IssuesAddAssigneesParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesAddAssigneesParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + }; + export type IssuesRemoveAssigneesParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesRemoveAssigneesParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + */ + assignees?: string[]; + }; + export type IssuesListCommentsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesListCommentsParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListCommentsForRepoParams = { + owner: string; + + repo: string; + /** + * Either `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * Either `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + }; + export type IssuesGetCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesCreateCommentParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The contents of the comment. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesCreateCommentParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The contents of the comment. + */ + body: string; + }; + export type IssuesUpdateCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The contents of the comment. + */ + body: string; + }; + export type IssuesDeleteCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + }; + export type IssuesListEventsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesListEventsParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListEventsForRepoParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesGetEventParams = { + owner: string; + + repo: string; + + event_id: number; + }; + export type IssuesListLabelsForRepoParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesGetLabelParams = { + owner: string; + + repo: string; + + name: string; + }; + export type IssuesCreateLabelParams = { + owner: string; + + repo: string; + /** + * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + name: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color: string; + /** + * A short description of the label. + */ + description?: string; + }; + export type IssuesUpdateLabelParams = { + owner: string; + + repo: string; + + current_name: string; + /** + * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + */ + name?: string; + /** + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + */ + color?: string; + /** + * A short description of the label. + */ + description?: string; + }; + export type IssuesDeleteLabelParams = { + owner: string; + + repo: string; + + name: string; + }; + export type IssuesListLabelsOnIssueParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesListLabelsOnIssueParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesAddLabelsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesAddLabelsParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels: string[]; + }; + export type IssuesRemoveLabelParamsDeprecatedNumber = { + owner: string; + + repo: string; + + name: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesRemoveLabelParams = { + owner: string; + + repo: string; + + issue_number: number; + + name: string; + }; + export type IssuesReplaceLabelsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesReplaceLabelsParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + */ + labels?: string[]; + }; + export type IssuesRemoveLabelsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesRemoveLabelsParams = { + owner: string; + + repo: string; + + issue_number: number; + }; + export type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + }; + export type IssuesListLabelsForMilestoneParams = { + owner: string; + + repo: string; + + milestone_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesListMilestonesForRepoParams = { + owner: string; + + repo: string; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The direction of the sort. Either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type IssuesGetMilestoneParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + }; + export type IssuesGetMilestoneParams = { + owner: string; + + repo: string; + + milestone_number: number; + }; + export type IssuesCreateMilestoneParams = { + owner: string; + + repo: string; + /** + * The title of the milestone. + */ + title: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + export type IssuesUpdateMilestoneParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The title of the milestone. + */ + title?: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + }; + export type IssuesUpdateMilestoneParams = { + owner: string; + + repo: string; + + milestone_number: number; + /** + * The title of the milestone. + */ + title?: string; + /** + * The state of the milestone. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * A description of the milestone. + */ + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; + }; + export type IssuesDeleteMilestoneParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; + }; + export type IssuesDeleteMilestoneParams = { + owner: string; + + repo: string; + + milestone_number: number; + }; + export type IssuesListEventsForTimelineParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type IssuesListEventsForTimelineParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type LicensesGetParams = { + license: string; + }; + export type LicensesGetForRepoParams = { + owner: string; + + repo: string; + }; + export type MarkdownRenderParams = { + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; + /** + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + */ + mode?: "markdown" | "gfm"; + /** + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + */ + context?: string; + }; + export type MarkdownRenderRawParams = { + data: string; + }; + export type MigrationsStartForOrgParams = { + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + /** + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + */ + exclude_attachments?: boolean; + }; + export type MigrationsListForOrgParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type MigrationsGetStatusForOrgParams = { + org: string; + + migration_id: number; + }; + export type MigrationsGetArchiveForOrgParams = { + org: string; + + migration_id: number; + }; + export type MigrationsDeleteArchiveForOrgParams = { + org: string; + + migration_id: number; + }; + export type MigrationsUnlockRepoForOrgParams = { + org: string; + + migration_id: number; + + repo_name: string; + }; + export type MigrationsStartImportParams = { + owner: string; + + repo: string; + /** + * The URL of the originating repository. + */ + vcs_url: string; + /** + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + */ + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + /** + * If authentication is required, the username to provide to `vcs_url`. + */ + vcs_username?: string; + /** + * If authentication is required, the password to provide to `vcs_url`. + */ + vcs_password?: string; + /** + * For a tfvc import, the name of the project that is being imported. + */ + tfvc_project?: string; + }; + export type MigrationsGetImportProgressParams = { + owner: string; + + repo: string; + }; + export type MigrationsUpdateImportParams = { + owner: string; + + repo: string; + /** + * The username to provide to the originating repository. + */ + vcs_username?: string; + /** + * The password to provide to the originating repository. + */ + vcs_password?: string; + }; + export type MigrationsGetCommitAuthorsParams = { + owner: string; + + repo: string; + /** + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + */ + since?: string; + }; + export type MigrationsMapCommitAuthorParams = { + owner: string; + + repo: string; + + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; + }; + export type MigrationsSetLfsPreferenceParams = { + owner: string; + + repo: string; + /** + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + */ + use_lfs: "opt_in" | "opt_out"; + }; + export type MigrationsGetLargeFilesParams = { + owner: string; + + repo: string; + }; + export type MigrationsCancelImportParams = { + owner: string; + + repo: string; + }; + export type MigrationsStartForAuthenticatedUserParams = { + /** + * An array of repositories to include in the migration. + */ + repositories: string[]; + /** + * Locks the `repositories` to prevent changes during the migration when set to `true`. + */ + lock_repositories?: boolean; + /** + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + */ + exclude_attachments?: boolean; + }; + export type MigrationsListForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type MigrationsGetStatusForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsGetArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsDeleteArchiveForAuthenticatedUserParams = { + migration_id: number; + }; + export type MigrationsUnlockRepoForAuthenticatedUserParams = { + migration_id: number; + + repo_name: string; + }; + export type OauthAuthorizationsListGrantsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OauthAuthorizationsGetGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsDeleteGrantParams = { + grant_id: number; + }; + export type OauthAuthorizationsListAuthorizationsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OauthAuthorizationsGetAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsCreateAuthorizationParams = { + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * The 20 character OAuth app client key for which to create the token. + */ + client_id?: string; + /** + * The 40 character OAuth app client secret for which to create the token. + */ + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + */ + fingerprint?: string; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { + client_id: string; + + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + }; + export type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { + client_id: string; + + fingerprint: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + }; + export type OauthAuthorizationsUpdateAuthorizationParams = { + authorization_id: number; + /** + * Replaces the authorization scopes with these. + */ + scopes?: string[]; + /** + * A list of scopes to add to this authorization. + */ + add_scopes?: string[]; + /** + * A list of scopes to remove from this authorization. + */ + remove_scopes?: string[]; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + }; + export type OauthAuthorizationsDeleteAuthorizationParams = { + authorization_id: number; + }; + export type OauthAuthorizationsCheckAuthorizationParams = { + client_id: string; + + access_token: string; + }; + export type OauthAuthorizationsResetAuthorizationParams = { + client_id: string; + + access_token: string; + }; + export type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { + client_id: string; + + access_token: string; + }; + export type OauthAuthorizationsRevokeGrantForApplicationParams = { + client_id: string; + + access_token: string; + }; + export type OrgsListForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsListParams = { + /** + * The integer ID of the last Organization that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsListForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsGetParams = { + org: string; + }; + export type OrgsUpdateParams = { + org: string; + /** + * Billing email address. This address is not publicized. + */ + billing_email?: string; + /** + * The company name. + */ + company?: string; + /** + * The publicly visible email address. + */ + email?: string; + /** + * The location. + */ + location?: string; + /** + * The shorthand name of the company. + */ + name?: string; + /** + * The description of the company. + */ + description?: string; + /** + * Toggles whether organization projects are enabled for the organization. + */ + has_organization_projects?: boolean; + /** + * Toggles whether repository projects are enabled for repositories that belong to the organization. + */ + has_repository_projects?: boolean; + /** + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. + */ + default_repository_permission?: "read" | "write" | "admin" | "none"; + /** + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only admin members can create repositories. + * Default: `true` + * **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_can_create_repositories?: boolean; + /** + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). + * \* `none` - only admin members can create repositories. + * **Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + */ + members_allowed_repository_creation_type?: "all" | "private" | "none"; + }; + export type OrgsListBlockedUsersParams = { + org: string; + }; + export type OrgsCheckBlockedUserParams = { + org: string; + + username: string; + }; + export type OrgsBlockUserParams = { + org: string; + + username: string; + }; + export type OrgsUnblockUserParams = { + org: string; + + username: string; + }; + export type OrgsListHooksParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsGetHookParams = { + org: string; + + hook_id: number; + }; + export type OrgsCreateHookParams = { + org: string; + /** + * Must be passed as "web". + */ + name: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + */ + config: OrgsCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + }; + export type OrgsUpdateHookParams = { + org: string; + + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + */ + config?: OrgsUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + }; + export type OrgsPingHookParams = { + org: string; + + hook_id: number; + }; + export type OrgsDeleteHookParams = { + org: string; + + hook_id: number; + }; + export type OrgsListMembersParams = { + org: string; + /** + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. + */ + filter?: "2fa_disabled" | "all"; + /** + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. + */ + role?: "all" | "admin" | "member"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsCheckMembershipParams = { + org: string; + + username: string; + }; + export type OrgsRemoveMemberParams = { + org: string; + + username: string; + }; + export type OrgsListPublicMembersParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsCheckPublicMembershipParams = { + org: string; + + username: string; + }; + export type OrgsPublicizeMembershipParams = { + org: string; + + username: string; + }; + export type OrgsConcealMembershipParams = { + org: string; + + username: string; + }; + export type OrgsGetMembershipParams = { + org: string; + + username: string; + }; + export type OrgsAddOrUpdateMembershipParams = { + org: string; + + username: string; + /** + * The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + */ + role?: "admin" | "member"; + }; + export type OrgsRemoveMembershipParams = { + org: string; + + username: string; + }; + export type OrgsListInvitationTeamsParams = { + org: string; + + invitation_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsListPendingInvitationsParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsCreateInvitationParams = { + org: string; + /** + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + */ + invitee_id?: number; + /** + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + */ + email?: string; + /** + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + */ + role?: "admin" | "direct_member" | "billing_manager"; + /** + * Specify IDs for the teams you want to invite new members to. + */ + team_ids?: number[]; + }; + export type OrgsListMembershipsParams = { + /** + * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. + */ + state?: "active" | "pending"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsGetMembershipForAuthenticatedUserParams = { + org: string; + }; + export type OrgsUpdateMembershipParams = { + org: string; + /** + * The state that the membership should be in. Only `"active"` will be accepted. + */ + state: "active"; + }; + export type OrgsListOutsideCollaboratorsParams = { + org: string; + /** + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. + */ + filter?: "2fa_disabled" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type OrgsRemoveOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type OrgsConvertMemberToOutsideCollaboratorParams = { + org: string; + + username: string; + }; + export type ProjectsListForRepoParams = { + owner: string; + + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsListForOrgParams = { + org: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsListForUserParams = { + username: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsGetParams = { + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsCreateForRepoParams = { + owner: string; + + repo: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsCreateForOrgParams = { + org: string; + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsCreateForAuthenticatedUserParams = { + /** + * The name of the project. + */ + name: string; + /** + * The description of the project. + */ + body?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsUpdateParams = { + project_id: number; + /** + * The name of the project. + */ + name?: string; + /** + * The description of the project. + */ + body?: string; + /** + * State of the project. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. + */ + organization_permission?: string; + /** + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + */ + private?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsDeleteParams = { + project_id: number; + }; + export type ProjectsListCardsParams = { + column_id: number; + /** + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + */ + archived_state?: "all" | "archived" | "not_archived"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsGetCardParams = { + card_id: number; + }; + export type ProjectsCreateCardParams = { + column_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + */ + note?: string; + /** + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. + */ + content_id?: number; + /** + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + */ + content_type?: string; + }; + export type ProjectsUpdateCardParams = { + card_id: number; + /** + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + */ + note?: string; + /** + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. + */ + archived?: boolean; + }; + export type ProjectsDeleteCardParams = { + card_id: number; + }; + export type ProjectsMoveCardParams = { + card_id: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; + }; + export type ProjectsListCollaboratorsParams = { + project_id: number; + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsReviewUserPermissionLevelParams = { + project_id: number; + + username: string; + }; + export type ProjectsAddCollaboratorParams = { + project_id: number; + + username: string; + /** + * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. + */ + permission?: "read" | "write" | "admin"; + }; + export type ProjectsRemoveCollaboratorParams = { + project_id: number; + + username: string; + }; + export type ProjectsListColumnsParams = { + project_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ProjectsGetColumnParams = { + column_id: number; + }; + export type ProjectsCreateColumnParams = { + project_id: number; + /** + * The name of the column. + */ + name: string; + }; + export type ProjectsUpdateColumnParams = { + column_id: number; + /** + * The new name of the column. + */ + name: string; + }; + export type ProjectsDeleteColumnParams = { + column_id: number; + }; + export type ProjectsMoveColumnParams = { + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; + }; + export type PullsListParams = { + owner: string; + + repo: string; + /** + * Either `open`, `closed`, or `all` to filter by state. + */ + state?: "open" | "closed" | "all"; + /** + * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + */ + head?: string; + /** + * Filter pulls by base branch name. Example: `gh-pages`. + */ + base?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). + */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** + * The direction of the sort. Can be either `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsGetParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsGetParams = { + owner: string; + + repo: string; + + pull_number: number; + }; + export type PullsCreateParams = { + owner: string; + + repo: string; + /** + * The title of the pull request. + */ + title: string; + /** + * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. + */ + head: string; + /** + * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + */ + base: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; + }; + export type PullsCreateFromIssueParams = { + owner: string; + + repo: string; + /** + * The issue number in this repository to turn into a Pull Request. + */ + issue: number; + /** + * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. + */ + head: string; + /** + * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + */ + base: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. + */ + draft?: boolean; + }; + export type PullsUpdateBranchParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. + */ + expected_head_sha?: string; + }; + export type PullsUpdateParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The title of the pull request. + */ + title?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + */ + base?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsUpdateParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * The title of the pull request. + */ + title?: string; + /** + * The contents of the pull request. + */ + body?: string; + /** + * State of this Pull Request. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + */ + base?: string; + /** + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + */ + maintainer_can_modify?: boolean; + }; + export type PullsListCommitsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsListCommitsParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsListFilesParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsListFilesParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsCheckIfMergedParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsCheckIfMergedParams = { + owner: string; + + repo: string; + + pull_number: number; + }; + export type PullsMergeParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsMergeParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Title for the automatic commit message. + */ + commit_title?: string; + /** + * Extra detail to append to automatic commit message. + */ + commit_message?: string; + /** + * SHA that pull request head must match to allow merge. + */ + sha?: string; + /** + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + */ + merge_method?: "merge" | "squash" | "rebase"; + }; + export type PullsListCommentsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsListCommentsParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsListCommentsForRepoParams = { + owner: string; + + repo: string; + /** + * Can be either `created` or `updated` comments. + */ + sort?: "created" | "updated"; + /** + * Can be either `asc` or `desc`. Ignored without `sort` parameter. + */ + direction?: "asc" | "desc"; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsGetCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + }; + export type PullsCreateCommentParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The text of the comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. + */ + position: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsCreateCommentParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * The text of the comment. + */ + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. + */ + position: number; + }; + export type PullsCreateCommentReplyParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The text of the comment. + */ + body: string; + /** + * 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. + */ + in_reply_to: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsCreateCommentReplyParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * The text of the comment. + */ + body: string; + /** + * 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. + */ + in_reply_to: number; + }; + export type PullsUpdateCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The text of the comment. + */ + body: string; + }; + export type PullsDeleteCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + }; + export type PullsListReviewRequestsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsListReviewRequestsParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsCreateReviewRequestParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsCreateReviewRequestParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * An array of user `login`s that will be requested. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be requested. + */ + team_reviewers?: string[]; + }; + export type PullsDeleteReviewRequestParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsDeleteReviewRequestParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * An array of user `login`s that will be removed. + */ + reviewers?: string[]; + /** + * An array of team `slug`s that will be removed. + */ + team_reviewers?: string[]; + }; + export type PullsListReviewsParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsListReviewsParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsGetReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsGetReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + }; + export type PullsDeletePendingReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsDeletePendingReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + }; + export type PullsGetCommentsForReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsGetCommentsForReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type PullsCreateReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + */ + commit_id?: string; + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsCreateReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + /** + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + */ + commit_id?: string; + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + */ + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; + }; + export type PullsUpdateReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * The body text of the pull request review. + */ + body: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsUpdateReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + /** + * The body text of the pull request review. + */ + body: string; + }; + export type PullsSubmitReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsSubmitReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + export type PullsDismissReviewParamsDeprecatedNumber = { + owner: string; + + repo: string; + + review_id: number; + /** + * The message for the pull request review dismissal + */ + message: string; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + }; + export type PullsDismissReviewParams = { + owner: string; + + repo: string; + + pull_number: number; + + review_id: number; + /** + * The message for the pull request review dismissal + */ + message: string; + }; + export type ReactionsListForCommitCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForCommitCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsListForIssueParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type ReactionsListForIssueParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForIssueParamsDeprecatedNumber = { + owner: string; + + repo: string; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + }; + export type ReactionsCreateForIssueParams = { + owner: string; + + repo: string; + + issue_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsListForIssueCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForIssueCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsListForPullRequestReviewCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForPullRequestReviewCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsListForTeamDiscussionParams = { + team_id: number; + + discussion_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForTeamDiscussionParams = { + team_id: number; + + discussion_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsListForTeamDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReactionsCreateForTeamDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + + comment_number: number; + /** + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + export type ReactionsDeleteParams = { + reaction_id: number; + }; + export type ReposListParams = { + /** + * Can be one of `all`, `public`, or `private`. + */ + visibility?: "all" | "public" | "private"; + /** + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string; + /** + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListForUserParams = { + username: string; + /** + * Can be one of `all`, `owner`, `member`. + */ + type?: "all" | "owner" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListForOrgParams = { + org: string; + /** + * Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`. + */ + type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListPublicParams = { + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposCreateForAuthenticatedUserParams = { + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + }; + export type ReposCreateInOrgParams = { + org: string; + /** + * The name of the repository. + */ + name: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + */ + team_id?: number; + /** + * Pass `true` to create an initial commit with empty README. + */ + auto_init?: boolean; + /** + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + */ + gitignore_template?: string; + /** + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + */ + license_template?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + }; + export type ReposCreateUsingTemplateParams = { + template_owner: string; + + template_repo: string; + /** + * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. + */ + owner?: string; + /** + * The name of the new repository. + */ + name: string; + /** + * A short description of the new repository. + */ + description?: string; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; + }; + export type ReposGetParams = { + owner: string; + + repo: string; + }; + export type ReposUpdateParams = { + owner: string; + + repo: string; + /** + * The name of the repository. + */ + name?: string; + /** + * A short description of the repository. + */ + description?: string; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + */ + private?: boolean; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + */ + allow_squash_merge?: boolean; + /** + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + */ + allow_merge_commit?: boolean; + /** + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + */ + allow_rebase_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; + }; + export type ReposListTopicsParams = { + owner: string; + + repo: string; + }; + export type ReposReplaceTopicsParams = { + owner: string; + + repo: string; + /** + * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + */ + names: string[]; + }; + export type ReposCheckVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposEnableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposDisableVulnerabilityAlertsParams = { + owner: string; + + repo: string; + }; + export type ReposEnableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposDisableAutomatedSecurityFixesParams = { + owner: string; + + repo: string; + }; + export type ReposListContributorsParams = { + owner: string; + + repo: string; + /** + * Set to `1` or `true` to include anonymous contributors in results. + */ + anon?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListLanguagesParams = { + owner: string; + + repo: string; + }; + export type ReposListTeamsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListTagsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposDeleteParams = { + owner: string; + + repo: string; + }; + export type ReposTransferParams = { + owner: string; + + repo: string; + /** + * **Required:** The username or organization name the repository will be transferred to. + */ + new_owner?: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; + }; + export type ReposListBranchesParams = { + owner: string; + + repo: string; + /** + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + */ + protected?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetBranchParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposGetBranchProtectionParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposUpdateBranchProtectionParams = { + owner: string; + + repo: string; + + branch: string; + /** + * Require status checks to pass before merging. Set to `null` to disable. + */ + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; + /** + * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + */ + enforce_admins: boolean | null; + /** + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. + */ + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; + /** + * Restrict who can push to this branch. Team and user `restrictions` are only available for organization-owned repositories. Set to `null` to disable. + */ + restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; + }; + export type ReposRemoveBranchProtectionParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposGetProtectedBranchRequiredStatusChecksParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposUpdateProtectedBranchRequiredStatusChecksParams = { + owner: string; + + repo: string; + + branch: string; + /** + * Require branches to be up to date before merging. + */ + strict?: boolean; + /** + * The list of status checks to require in order to merge into this branch + */ + contexts?: string[]; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposListProtectedBranchRequiredStatusChecksContextsParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { + owner: string; + + repo: string; + + branch: string; + + contexts: string[]; + }; + export type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { + owner: string; + + repo: string; + + branch: string; + + contexts: string[]; + }; + export type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { + owner: string; + + repo: string; + + branch: string; + + contexts: string[]; + }; + export type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; + /** + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + */ + dismiss_stale_reviews?: boolean; + /** + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + */ + require_code_owner_reviews?: boolean; + /** + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + */ + required_approving_review_count?: number; + }; + export type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposGetProtectedBranchRequiredSignaturesParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposAddProtectedBranchRequiredSignaturesParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposRemoveProtectedBranchRequiredSignaturesParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposGetProtectedBranchAdminEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposAddProtectedBranchAdminEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposRemoveProtectedBranchAdminEnforcementParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposGetProtectedBranchRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposRemoveProtectedBranchRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposListProtectedBranchTeamRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposReplaceProtectedBranchTeamRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + teams: string[]; + }; + export type ReposAddProtectedBranchTeamRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + teams: string[]; + }; + export type ReposRemoveProtectedBranchTeamRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + teams: string[]; + }; + export type ReposListProtectedBranchUserRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + }; + export type ReposReplaceProtectedBranchUserRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + users: string[]; + }; + export type ReposAddProtectedBranchUserRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + users: string[]; + }; + export type ReposRemoveProtectedBranchUserRestrictionsParams = { + owner: string; + + repo: string; + + branch: string; + + users: string[]; + }; + export type ReposListCollaboratorsParams = { + owner: string; + + repo: string; + /** + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposCheckCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposGetCollaboratorPermissionLevelParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposAddCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; + }; + export type ReposRemoveCollaboratorParams = { + owner: string; + + repo: string; + + username: string; + }; + export type ReposListCommitCommentsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposListCommentsForCommitParamsDeprecatedRef = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * @deprecated "ref" parameter renamed to "commit_sha" + */ + ref: string; + }; + export type ReposListCommentsForCommitParams = { + owner: string; + + repo: string; + + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposCreateCommitCommentParamsDeprecatedSha = { + owner: string; + + repo: string; + /** + * The contents of the comment. + */ + body: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + */ + line?: number; + /** + * @deprecated "sha" parameter renamed to "commit_sha" + */ + sha: string; + }; + export type ReposCreateCommitCommentParams = { + owner: string; + + repo: string; + + commit_sha: string; + /** + * The contents of the comment. + */ + body: string; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; + /** + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + */ + line?: number; + }; + export type ReposGetCommitCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + }; + export type ReposUpdateCommitCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + /** + * The contents of the comment + */ + body: string; + }; + export type ReposDeleteCommitCommentParams = { + owner: string; + + repo: string; + + comment_id: number; + }; + export type ReposListCommitsParams = { + owner: string; + + repo: string; + /** + * SHA or branch to start listing commits from. + */ + sha?: string; + /** + * Only commits containing this file path will be returned. + */ + path?: string; + /** + * GitHub login or email address by which to filter by commit author. + */ + author?: string; + /** + * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + until?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetCommitParamsDeprecatedCommitSha = { + owner: string; + + repo: string; + /** + * @deprecated "commit_sha" parameter renamed to "ref" + */ + commit_sha: string; + }; + export type ReposGetCommitParamsDeprecatedSha = { + owner: string; + + repo: string; + + ref: string; + /** + * @deprecated "sha" parameter renamed to "ref" + */ + sha?: ReposGetCommitParamsDeprecatedSha; + }; + export type ReposGetCommitParams = { + owner: string; + + repo: string; + + ref: string; + }; + export type ReposGetCommitRefShaParams = { + owner: string; + + repo: string; + + ref: string; + }; + export type ReposCompareCommitsParams = { + owner: string; + + repo: string; + + base: string; + + head: string; + }; + export type ReposListBranchesForHeadCommitParams = { + owner: string; + + repo: string; + + commit_sha: string; + }; + export type ReposListPullRequestsAssociatedWithCommitParams = { + owner: string; + + repo: string; + + commit_sha: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposRetrieveCommunityProfileMetricsParams = { + owner: string; + + repo: string; + }; + export type ReposGetReadmeParams = { + owner: string; + + repo: string; + /** + * The name of the commit/branch/tag. + */ + ref?: string; + }; + export type ReposGetContentsParams = { + owner: string; + + repo: string; + + path: string; + /** + * The name of the commit/branch/tag. + */ + ref?: string; + }; + export type ReposCreateOrUpdateFileParams = { + owner: string; + + repo: string; + + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. + */ + branch?: string; + /** + * The person that committed the file. + */ + committer?: ReposCreateOrUpdateFileParamsCommitter; + /** + * The author of the file. + */ + author?: ReposCreateOrUpdateFileParamsAuthor; + }; + export type ReposCreateFileParams = { + owner: string; + + repo: string; + + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. + */ + branch?: string; + /** + * The person that committed the file. + */ + committer?: ReposCreateFileParamsCommitter; + /** + * The author of the file. + */ + author?: ReposCreateFileParamsAuthor; + }; + export type ReposUpdateFileParams = { + owner: string; + + repo: string; + + path: string; + /** + * The commit message. + */ + message: string; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; + /** + * The branch name. + */ + branch?: string; + /** + * The person that committed the file. + */ + committer?: ReposUpdateFileParamsCommitter; + /** + * The author of the file. + */ + author?: ReposUpdateFileParamsAuthor; + }; + export type ReposDeleteFileParams = { + owner: string; + + repo: string; + + path: string; + /** + * The commit message. + */ + message: string; + /** + * The blob SHA of the file being replaced. + */ + sha: string; + /** + * The branch name. + */ + branch?: string; + /** + * object containing information about the committer. + */ + committer?: ReposDeleteFileParamsCommitter; + /** + * object containing information about the author. + */ + author?: ReposDeleteFileParamsAuthor; + }; + export type ReposGetArchiveLinkParams = { + owner: string; + + repo: string; + + archive_format: string; + + ref: string; + }; + export type ReposListDeploymentsParams = { + owner: string; + + repo: string; + /** + * The SHA recorded at creation time. + */ + sha?: string; + /** + * The name of the ref. This can be a branch, tag, or SHA. + */ + ref?: string; + /** + * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * The name of the environment that was deployed to (e.g., `staging` or `production`). + */ + environment?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetDeploymentParams = { + owner: string; + + repo: string; + + deployment_id: number; + }; + export type ReposCreateDeploymentParams = { + owner: string; + + repo: string; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. + */ + required_contexts?: string[]; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; + }; + export type ReposListDeploymentStatusesParams = { + owner: string; + + repo: string; + + deployment_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetDeploymentStatusParams = { + owner: string; + + repo: string; + + deployment_id: number; + + status_id: number; + }; + export type ReposCreateDeploymentStatusParams = { + owner: string; + + repo: string; + + deployment_id: number; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + */ + target_url?: string; + /** + * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + log_url?: string; + /** + * A short description of the status. The maximum description length is 140 characters. + */ + description?: string; + /** + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + environment?: "production" | "staging" | "qa"; + /** + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + environment_url?: string; + /** + * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + auto_inactive?: boolean; + }; + export type ReposListDownloadsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetDownloadParams = { + owner: string; + + repo: string; + + download_id: number; + }; + export type ReposDeleteDownloadParams = { + owner: string; + + repo: string; + + download_id: number; + }; + export type ReposListForksParams = { + owner: string; + + repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposCreateForkParams = { + owner: string; + + repo: string; + /** + * Optional parameter to specify the organization name if forking into an organization. + */ + organization?: string; + }; + export type ReposListHooksParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetHookParams = { + owner: string; + + repo: string; + + hook_id: number; + }; + export type ReposCreateHookParams = { + owner: string; + + repo: string; + /** + * Use `web` to create a webhook. This parameter only accepts the value `web`. + */ + name?: string; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config: ReposCreateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + */ + events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + }; + export type ReposUpdateHookParams = { + owner: string; + + repo: string; + + hook_id: number; + /** + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + */ + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; + /** + * Determines a list of events to be added to the list of events that the Hook triggers for. + */ + add_events?: string[]; + /** + * Determines a list of events to be removed from the list of events that the Hook triggers for. + */ + remove_events?: string[]; + /** + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + */ + active?: boolean; + }; + export type ReposTestPushHookParams = { + owner: string; + + repo: string; + + hook_id: number; + }; + export type ReposPingHookParams = { + owner: string; + + repo: string; + + hook_id: number; + }; + export type ReposDeleteHookParams = { + owner: string; + + repo: string; + + hook_id: number; + }; + export type ReposListInvitationsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposDeleteInvitationParams = { + owner: string; + + repo: string; + + invitation_id: number; + }; + export type ReposUpdateInvitationParams = { + owner: string; + + repo: string; + + invitation_id: number; + /** + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + */ + permissions?: "read" | "write" | "admin"; + }; + export type ReposListInvitationsForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposAcceptInvitationParams = { + invitation_id: number; + }; + export type ReposDeclineInvitationParams = { + invitation_id: number; + }; + export type ReposListDeployKeysParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetDeployKeyParams = { + owner: string; + + repo: string; + + key_id: number; + }; + export type ReposAddDeployKeyParams = { + owner: string; + + repo: string; + /** + * A name for the key. + */ + title?: string; + /** + * The contents of the key. + */ + key: string; + /** + * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + export type ReposRemoveDeployKeyParams = { + owner: string; + + repo: string; + + key_id: number; + }; + export type ReposMergeParams = { + owner: string; + + repo: string; + /** + * The name of the base branch that the head will be merged into. + */ + base: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; + }; + export type ReposGetPagesParams = { + owner: string; + + repo: string; + }; + export type ReposEnablePagesSiteParams = { + owner: string; + + repo: string; + + source?: ReposEnablePagesSiteParamsSource; + }; + export type ReposDisablePagesSiteParams = { + owner: string; + + repo: string; + }; + export type ReposUpdateInformationAboutPagesSiteParams = { + owner: string; + + repo: string; + /** + * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + /** + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. + */ + source?: '"gh-pages"' | '"master"' | '"master /docs"'; + }; + export type ReposRequestPageBuildParams = { + owner: string; + + repo: string; + }; + export type ReposListPagesBuildsParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetLatestPagesBuildParams = { + owner: string; + + repo: string; + }; + export type ReposGetPagesBuildParams = { + owner: string; + + repo: string; + + build_id: number; + }; + export type ReposListReleasesParams = { + owner: string; + + repo: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetReleaseParams = { + owner: string; + + repo: string; + + release_id: number; + }; + export type ReposGetLatestReleaseParams = { + owner: string; + + repo: string; + }; + export type ReposGetReleaseByTagParams = { + owner: string; + + repo: string; + + tag: string; + }; + export type ReposCreateReleaseParams = { + owner: string; + + repo: string; + /** + * The name of the tag. + */ + tag_name: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. + */ + target_commitish?: string; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` to create a draft (unpublished) release, `false` to create a published one. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. + */ + prerelease?: boolean; + }; + export type ReposUpdateReleaseParams = { + owner: string; + + repo: string; + + release_id: number; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. + */ + target_commitish?: string; + /** + * The name of the release. + */ + name?: string; + /** + * Text describing the contents of the tag. + */ + body?: string; + /** + * `true` makes the release a draft, and `false` publishes the release. + */ + draft?: boolean; + /** + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + */ + prerelease?: boolean; + }; + export type ReposDeleteReleaseParams = { + owner: string; + + repo: string; + + release_id: number; + }; + export type ReposListAssetsForReleaseParams = { + owner: string; + + repo: string; + + release_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposUploadReleaseAssetParams = { + url: string; + /** + * Request headers containing `content-type` and `content-length` + */ + headers: ReposUploadReleaseAssetParamsHeaders; + /** + * The file name of the asset. This should be set in a URI query parameter. + */ + name: string; + /** + * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. + */ + label?: string; + + file: string | object; + }; + export type ReposGetReleaseAssetParams = { + owner: string; + + repo: string; + + asset_id: number; + }; + export type ReposUpdateReleaseAssetParams = { + owner: string; + + repo: string; + + asset_id: number; + /** + * The file name of the asset. + */ + name?: string; + /** + * An alternate short description of the asset. Used in place of the filename. + */ + label?: string; + }; + export type ReposDeleteReleaseAssetParams = { + owner: string; + + repo: string; + + asset_id: number; + }; + export type ReposGetContributorsStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCommitActivityStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetCodeFrequencyStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetParticipationStatsParams = { + owner: string; + + repo: string; + }; + export type ReposGetPunchCardStatsParams = { + owner: string; + + repo: string; + }; + export type ReposCreateStatusParams = { + owner: string; + + repo: string; + + sha: string; + /** + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + */ + state: "error" | "failure" | "pending" | "success"; + /** + * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string; + /** + * A short description of the status. + */ + description?: string; + /** + * A string label to differentiate this status from the status of other systems. + */ + context?: string; + }; + export type ReposListStatusesForRefParams = { + owner: string; + + repo: string; + + ref: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type ReposGetCombinedStatusForRefParams = { + owner: string; + + repo: string; + + ref: string; + }; + export type ReposGetTopReferrersParams = { + owner: string; + + repo: string; + }; + export type ReposGetTopPathsParams = { + owner: string; + + repo: string; + }; + export type ReposGetViewsParams = { + owner: string; + + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + }; + export type ReposGetClonesParams = { + owner: string; + + repo: string; + /** + * Must be one of: `day`, `week`. + */ + per?: "day" | "week"; + }; + export type SearchReposParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. + */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchCommitsParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. + */ + sort?: "author-date" | "committer-date"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchCodeParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. + */ + sort?: "indexed"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchIssuesAndPullRequestsParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchIssuesParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, + */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchUsersParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. + */ + sort?: "followers" | "repositories" | "joined"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type SearchTopicsParams = { + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + }; + export type SearchLabelsParams = { + /** + * The id of the repository. + */ + repository_id: number; + /** + * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + */ + q: string; + /** + * Sorts the results of your query by when the label was `created` or `updated`. + */ + sort?: "created" | "updated"; + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; + }; + export type TeamsListParams = { + org: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsGetParams = { + team_id: number; + }; + export type TeamsGetByNameParams = { + org: string; + + team_slug: string; + }; + export type TeamsCreateParams = { + org: string; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * The logins of organization members to add as maintainers of the team. + */ + maintainers?: string[]; + /** + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. + */ + repo_names?: string[]; + /** + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` + * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. **For a parent or child team:** + */ + privacy?: "secret" | "closed"; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + }; + export type TeamsUpdateParams = { + team_id: number; + /** + * The name of the team. + */ + name: string; + /** + * The description of the team. + */ + description?: string; + /** + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + */ + privacy?: string; + /** + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + */ + permission?: "pull" | "push" | "admin"; + /** + * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + */ + parent_team_id?: number; + }; + export type TeamsDeleteParams = { + team_id: number; + }; + export type TeamsListChildParams = { + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsListReposParams = { + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsCheckManagesRepoParams = { + team_id: number; + + owner: string; + + repo: string; + }; + export type TeamsAddOrUpdateRepoParams = { + team_id: number; + + owner: string; + + repo: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team. + */ + permission?: "pull" | "push" | "admin"; + }; + export type TeamsRemoveRepoParams = { + team_id: number; + + owner: string; + + repo: string; + }; + export type TeamsListForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsListProjectsParams = { + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsReviewProjectParams = { + team_id: number; + + project_id: number; + }; + export type TeamsAddOrUpdateProjectParams = { + team_id: number; + + project_id: number; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team. + */ + permission?: "read" | "write" | "admin"; + }; + export type TeamsRemoveProjectParams = { + team_id: number; + + project_id: number; + }; + export type TeamsListDiscussionCommentsParams = { + team_id: number; + + discussion_number: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsGetDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + + comment_number: number; + }; + export type TeamsCreateDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + /** + * The discussion comment's body text. + */ + body: string; + }; + export type TeamsUpdateDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + + comment_number: number; + /** + * The discussion comment's body text. + */ + body: string; + }; + export type TeamsDeleteDiscussionCommentParams = { + team_id: number; + + discussion_number: number; + + comment_number: number; + }; + export type TeamsListDiscussionsParams = { + team_id: number; + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsGetDiscussionParams = { + team_id: number; + + discussion_number: number; + }; + export type TeamsCreateDiscussionParams = { + team_id: number; + /** + * The discussion post's title. + */ + title: string; + /** + * The discussion post's body text. + */ + body: string; + /** + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + */ + private?: boolean; + }; + export type TeamsUpdateDiscussionParams = { + team_id: number; + + discussion_number: number; + /** + * The discussion post's title. + */ + title?: string; + /** + * The discussion post's body text. + */ + body?: string; + }; + export type TeamsDeleteDiscussionParams = { + team_id: number; + + discussion_number: number; + }; + export type TeamsListMembersParams = { + team_id: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type TeamsGetMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsAddMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsRemoveMemberParams = { + team_id: number; + + username: string; + }; + export type TeamsGetMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsAddOrUpdateMembershipParams = { + team_id: number; + + username: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; + }; + export type TeamsRemoveMembershipParams = { + team_id: number; + + username: string; + }; + export type TeamsListPendingInvitationsParams = { + team_id: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersGetByUsernameParams = { + username: string; + }; + export type UsersUpdateAuthenticatedParams = { + /** + * The new name of the user. + */ + name?: string; + /** + * The publicly visible email address of the user. + */ + email?: string; + /** + * The new blog URL of the user. + */ + blog?: string; + /** + * The new company of the user. + */ + company?: string; + /** + * The new location of the user. + */ + location?: string; + /** + * The new hiring availability of the user. + */ + hireable?: boolean; + /** + * The new short biography of the user. + */ + bio?: string; + }; + export type UsersGetContextForUserParams = { + username: string; + /** + * Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. + */ + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + /** + * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. + */ + subject_id?: string; + }; + export type UsersListParams = { + /** + * The integer ID of the last User that you've seen. + */ + since?: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersCheckBlockedParams = { + username: string; + }; + export type UsersBlockParams = { + username: string; + }; + export type UsersUnblockParams = { + username: string; + }; + export type UsersListEmailsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListPublicEmailsParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersAddEmailsParams = { + /** + * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersDeleteEmailsParams = { + /** + * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. + */ + emails: string[]; + }; + export type UsersTogglePrimaryEmailVisibilityParams = { + /** + * Specify the _primary_ email address that needs a visibility change. + */ + email: string; + /** + * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. + */ + visibility: string; + }; + export type UsersListFollowersForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListFollowersForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListFollowingForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListFollowingForAuthenticatedUserParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersCheckFollowingParams = { + username: string; + }; + export type UsersCheckFollowingForUserParams = { + username: string; + + target_user: string; + }; + export type UsersFollowParams = { + username: string; + }; + export type UsersUnfollowParams = { + username: string; + }; + export type UsersListGpgKeysForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListGpgKeysParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersGetGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersCreateGpgKeyParams = { + /** + * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. + */ + armored_public_key?: string; + }; + export type UsersDeleteGpgKeyParams = { + gpg_key_id: number; + }; + export type UsersListPublicKeysForUserParams = { + username: string; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersListPublicKeysParams = { + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Page number of the results to fetch. + */ + page?: number; + }; + export type UsersGetPublicKeyParams = { + key_id: number; + }; + export type UsersCreatePublicKeyParams = { + /** + * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". + */ + title?: string; + /** + * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. + */ + key?: string; + }; + export type UsersDeletePublicKeyParams = { + key_id: number; + }; + export type AppsCreateInstallationTokenParamsPermissions = {}; + export type ChecksCreateParamsOutput = { + title: string; + summary: string; + text?: string; + annotations?: ChecksCreateParamsOutputAnnotations[]; + images?: ChecksCreateParamsOutputImages[]; + }; + export type ChecksCreateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; + }; + export type ChecksCreateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; + }; + export type ChecksCreateParamsActions = { + label: string; + description: string; + identifier: string; + }; + export type ChecksUpdateParamsOutput = { + title?: string; + summary: string; + text?: string; + annotations?: ChecksUpdateParamsOutputAnnotations[]; + images?: ChecksUpdateParamsOutputImages[]; + }; + export type ChecksUpdateParamsOutputAnnotations = { + path: string; + start_line: number; + end_line: number; + start_column?: number; + end_column?: number; + annotation_level: "notice" | "warning" | "failure"; + message: string; + title?: string; + raw_details?: string; + }; + export type ChecksUpdateParamsOutputImages = { + alt: string; + image_url: string; + caption?: string; + }; + export type ChecksUpdateParamsActions = { + label: string; + description: string; + identifier: string; + }; + export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { + app_id: number; + setting: boolean; + }; + export type GistsCreateParamsFiles = { + content?: string; + }; + export type GistsUpdateParamsFiles = { + content?: string; + filename?: string; + }; + export type GitCreateCommitParamsAuthor = { + name?: string; + email?: string; + date?: string; + }; + export type GitCreateCommitParamsCommitter = { + name?: string; + email?: string; + date?: string; + }; + export type GitCreateTagParamsTagger = { + name?: string; + email?: string; + date?: string; + }; + export type GitCreateTreeParamsTree = { + path?: string; + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + type?: "blob" | "tree" | "commit"; + sha?: string; + content?: string; + }; + export type OrgsCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; + }; + export type OrgsUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; + }; + export type PullsCreateReviewParamsComments = { + path: string; + position: number; + body: string; + }; + export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { + strict: boolean; + contexts: string[]; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { + dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; + dismiss_stale_reviews?: boolean; + require_code_owner_reviews?: boolean; + required_approving_review_count?: number; + }; + export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { + users?: string[]; + teams?: string[]; + }; + export type ReposUpdateBranchProtectionParamsRestrictions = { + users?: string[]; + teams?: string[]; + }; + export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { + users?: string[]; + teams?: string[]; + }; + export type ReposCreateOrUpdateFileParamsCommitter = { + name: string; + email: string; + }; + export type ReposCreateOrUpdateFileParamsAuthor = { + name: string; + email: string; + }; + export type ReposCreateFileParamsCommitter = { + name: string; + email: string; + }; + export type ReposCreateFileParamsAuthor = { + name: string; + email: string; + }; + export type ReposUpdateFileParamsCommitter = { + name: string; + email: string; + }; + export type ReposUpdateFileParamsAuthor = { + name: string; + email: string; + }; + export type ReposDeleteFileParamsCommitter = { + name?: string; + email?: string; + }; + export type ReposDeleteFileParamsAuthor = { + name?: string; + email?: string; + }; + export type ReposCreateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; + }; + export type ReposUpdateHookParamsConfig = { + url: string; + content_type?: string; + secret?: string; + insecure_ssl?: string; + }; + export type ReposEnablePagesSiteParamsSource = { + branch?: "master" | "gh-pages"; + path?: string; + }; + export type ReposUploadReleaseAssetParamsHeaders = { + "content-length": number; + "content-type": string; + }; +} + +declare class Octokit { + constructor(options?: Octokit.Options); + authenticate(auth: Octokit.AuthBasic): void; + authenticate(auth: Octokit.AuthOAuthToken): void; + authenticate(auth: Octokit.AuthOAuthSecret): void; + authenticate(auth: Octokit.AuthUserToken): void; + authenticate(auth: Octokit.AuthJWT): void; + + hook: { + before( + name: string, + callback: (options: Octokit.HookOptions) => void + ): void; + after( + name: string, + callback: ( + response: Octokit.Response, + options: Octokit.HookOptions + ) => void + ): void; + error( + name: string, + callback: (error: Octokit.HookError, options: Octokit.HookOptions) => void + ): void; + wrap( + name: string, + callback: ( + request: ( + options: Octokit.HookOptions + ) => Promise>, + options: Octokit.HookOptions + ) => void + ): void; + }; + + static plugin(plugin: Octokit.Plugin | Octokit.Plugin[]): Octokit.Static; + + registerEndpoints(endpoints: { + [scope: string]: Octokit.EndpointOptions; + }): void; + + request: Octokit.Request; + + paginate: Octokit.Paginate; + + log: Octokit.Log; + + activity: { + /** + * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + listPublicEvents: { + (params?: Octokit.ActivityListPublicEventsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + listRepoEvents: { + (params?: Octokit.ActivityListRepoEventsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForRepoNetwork: { + (params?: Octokit.ActivityListPublicEventsForRepoNetworkParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForOrg: { + (params?: Octokit.ActivityListPublicEventsForOrgParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + listReceivedEventsForUser: { + (params?: Octokit.ActivityListReceivedEventsForUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + listReceivedPublicEventsForUser: { + (params?: Octokit.ActivityListReceivedPublicEventsForUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForUser: { + (params?: Octokit.ActivityListEventsForUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + listPublicEventsForUser: { + (params?: Octokit.ActivityListPublicEventsForUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listEventsForOrg: { + (params?: Octokit.ActivityListEventsForOrgParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + listFeeds: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + * + * The following example uses the `since` parameter to list notifications that have been updated after the specified time. + */ + listNotifications: { + (params?: Octokit.ActivityListNotificationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all notifications for the current user. + */ + listNotificationsForRepo: { + (params?: Octokit.ActivityListNotificationsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Marking a notification as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. + */ + markAsRead: { + (params?: Octokit.ActivityMarkAsReadParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Marking all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsReadForRepo: { + (params?: Octokit.ActivityMarkNotificationsAsReadForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getThread: { + (params?: Octokit.ActivityGetThreadParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + markThreadAsRead: { + (params?: Octokit.ActivityMarkThreadAsReadParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + getThreadSubscription: { + (params?: Octokit.ActivityGetThreadSubscriptionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This lets you subscribe or unsubscribe from a conversation. + */ + setThreadSubscription: { + (params?: Octokit.ActivitySetThreadSubscriptionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. + */ + deleteThreadSubscription: { + (params?: Octokit.ActivityDeleteThreadSubscriptionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listStargazersForRepo: { + (params?: Octokit.ActivityListStargazersForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByUser: { + (params?: Octokit.ActivityListReposStarredByUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByAuthenticatedUser: { + ( + params?: Octokit.ActivityListReposStarredByAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListReposStarredByAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + checkStarringRepo: { + (params?: Octokit.ActivityCheckStarringRepoParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + starRepo: { + (params?: Octokit.ActivityStarRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Requires for the user to be authenticated. + */ + unstarRepo: { + (params?: Octokit.ActivityUnstarRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchersForRepo: { + (params?: Octokit.ActivityListWatchersForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReposWatchedByUser: { + (params?: Octokit.ActivityListReposWatchedByUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listWatchedReposForAuthenticatedUser: { + ( + params?: Octokit.ActivityListWatchedReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ActivityListWatchedReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + getRepoSubscription: { + (params?: Octokit.ActivityGetRepoSubscriptionParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + (params?: Octokit.ActivitySetRepoSubscriptionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription). + */ + deleteRepoSubscription: { + (params?: Octokit.ActivityDeleteRepoSubscriptionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + apps: { + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + getBySlug: { + (params?: Octokit.AppsGetBySlugParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getAuthenticated: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + listInstallations: { + (params?: Octokit.AppsListInstallationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getInstallation: { + (params?: Octokit.AppsGetInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + deleteInstallation: { + (params?: Octokit.AppsDeleteInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. + * + * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. + */ + createInstallationToken: { + (params?: Octokit.AppsCreateInstallationTokenParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getOrgInstallation: { + (params?: Octokit.AppsGetOrgInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + findOrgInstallation: { + (params?: Octokit.AppsFindOrgInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + (params?: Octokit.AppsGetRepoInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + findRepoInstallation: { + (params?: Octokit.AppsFindRepoInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + (params?: Octokit.AppsGetUserInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + findUserInstallation: { + (params?: Octokit.AppsFindUserInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + createFromManifest: { + (params?: Octokit.AppsCreateFromManifestParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List repositories that an installation can access. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + listRepos: { + (params?: Octokit.AppsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + listInstallationsForAuthenticatedUser: { + ( + params?: Octokit.AppsListInstallationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + listInstallationReposForAuthenticatedUser: { + ( + params?: Octokit.AppsListInstallationReposForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListInstallationReposForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + addRepoToInstallation: { + (params?: Octokit.AppsAddRepoToInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + removeRepoFromInstallation: { + (params?: Octokit.AppsRemoveRepoFromInstallationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * + * This example creates a content attachment for the domain `https://errors.ai/`. + */ + createContentAttachment: { + (params?: Octokit.AppsCreateContentAttachmentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlans: { + (params?: Octokit.AppsListPlansParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { + (params?: Octokit.AppsListPlansStubbedParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlan: { + (params?: Octokit.AppsListAccountsUserOrOrgOnPlanParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlanStubbed: { + (params?: Octokit.AppsListAccountsUserOrOrgOnPlanStubbedParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAny: { + (params?: Octokit.AppsCheckAccountIsAssociatedWithAnyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAnyStubbed: { + ( + params?: Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUser: { + ( + params?: Octokit.AppsListMarketplacePurchasesForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + */ + listMarketplacePurchasesForAuthenticatedUserStubbed: { + ( + params?: Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams + ): Promise< + Octokit.Response< + Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + }; + checks: { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * #### [](https://developer.github.com/v3/checks/runs/#actions-object)`actions` object + */ + create: { + (params?: Octokit.ChecksCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + * + * #### [](https://developer.github.com/v3/checks/runs/#actions-object-1)`actions` object + */ + update: { + (params?: Octokit.ChecksUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForRef: { + (params?: Octokit.ChecksListForRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForSuite: { + (params?: Octokit.ChecksListForSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: { + (params?: Octokit.ChecksGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. + */ + listAnnotations: { + (params?: Octokit.ChecksListAnnotationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + getSuite: { + (params?: Octokit.ChecksGetSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + listSuitesForRef: { + (params?: Octokit.ChecksListSuitesForRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + (params?: Octokit.ChecksSetSuitesPreferencesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + createSuite: { + (params?: Octokit.ChecksCreateSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + rerequestSuite: { + (params?: Octokit.ChecksRerequestSuiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + codesOfConduct: { + listConductCodes: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getConductCode: { + (params?: Octokit.CodesOfConductGetConductCodeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's code of conduct file, if one is detected. + */ + getForRepo: { + (params?: Octokit.CodesOfConductGetForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + emojis: { + /** + * Lists all the emojis available to use on GitHub. + */ + get: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + gists: { + listPublicForUser: { + (params?: Octokit.GistsListPublicForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + list: { + (params?: Octokit.GistsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://developer.github.com/v3/#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + listPublic: { + (params?: Octokit.GistsListPublicParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + (params?: Octokit.GistsListStarredParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.GistsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getRevision: { + (params?: Octokit.GistsGetRevisionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + create: { + (params?: Octokit.GistsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. + */ + update: { + (params?: Octokit.GistsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listCommits: { + (params?: Octokit.GistsListCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + star: { + (params?: Octokit.GistsStarParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unstar: { + (params?: Octokit.GistsUnstarParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + checkIsStarred: { + (params?: Octokit.GistsCheckIsStarredParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: This was previously `/gists/:gist_id/fork`. + */ + fork: { + (params?: Octokit.GistsForkParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.GistsListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + delete: { + (params?: Octokit.GistsDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listComments: { + (params?: Octokit.GistsListCommentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + (params?: Octokit.GistsGetCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createComment: { + (params?: Octokit.GistsCreateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + (params?: Octokit.GistsUpdateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + (params?: Octokit.GistsDeleteCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + git: { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + getBlob: { + (params?: Octokit.GitGetBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createBlob: { + (params?: Octokit.GitCreateBlobParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + (params?: Octokit.GitGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * In this example, the payload of the signature would be: + * + * + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createCommit: { + (params?: Octokit.GitCreateCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns a branch or tag reference. Other than the [REST API](https://developer.github.com/v3/git/refs/#get-a-reference) it always returns a single reference. If the REST API returns with an array then the method responds with an error. + */ + getRef: { + (params?: Octokit.GitGetRefParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This will return an array of all the references on the system, including things like notes and stashes if they exist on the server + */ + listRefs: { + (params?: Octokit.GitListRefsParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + createRef: { + (params?: Octokit.GitCreateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateRef: { + (params?: Octokit.GitUpdateRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a + * ``` + * + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 + * ``` + */ + deleteRef: { + (params?: Octokit.GitDeleteRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getTag: { + (params?: Octokit.GitGetTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + createTag: { + (params?: Octokit.GitCreateTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If `truncated` in the response is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, omit the `recursive` parameter, and fetch one sub-tree at a time. If you need to fetch even more items, you can clone the repository and iterate over the Git data locally. + */ + getTree: { + (params?: Octokit.GitGetTreeParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out. + */ + createTree: { + (params?: Octokit.GitCreateTreeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + gitignore: { + /** + * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). + */ + listTemplates: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The API also allows fetching the source of a single template. + * + * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. + */ + getTemplate: { + (params?: Octokit.GitignoreGetTemplateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + interactions: { + /** + * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForOrg: { + (params?: Octokit.InteractionsGetRestrictionsForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. + */ + addOrUpdateRestrictionsForOrg: { + ( + params?: Octokit.InteractionsAddOrUpdateRestrictionsForOrgParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForOrgResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + removeRestrictionsForOrg: { + (params?: Octokit.InteractionsRemoveRestrictionsForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForRepo: { + (params?: Octokit.InteractionsGetRestrictionsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. + */ + addOrUpdateRestrictionsForRepo: { + ( + params?: Octokit.InteractionsAddOrUpdateRestrictionsForRepoParams + ): Promise< + Octokit.Response< + Octokit.InteractionsAddOrUpdateRestrictionsForRepoResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. + */ + removeRestrictionsForRepo: { + (params?: Octokit.InteractionsRemoveRestrictionsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + issues: { + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + list: { + (params?: Octokit.IssuesListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForAuthenticatedUser: { + (params?: Octokit.IssuesListForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForOrg: { + (params?: Octokit.IssuesListForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + listForRepo: { + (params?: Octokit.IssuesListForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + get: { + (params?: Octokit.IssuesGetParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + (params?: Octokit.IssuesCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue owners and users with push access can edit an issue. + */ + update: { + (params?: Octokit.IssuesUpdateParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + lock: { + (params?: Octokit.IssuesLockParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesLockParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access can unlock an issue's conversation. + */ + unlock: { + (params?: Octokit.IssuesUnlockParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesUnlockParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + listAssignees: { + (params?: Octokit.IssuesListAssigneesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + checkAssignee: { + (params?: Octokit.IssuesCheckAssigneeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + * + * This example adds two assignees to the existing `octocat` assignee. + */ + addAssignees: { + (params?: Octokit.IssuesAddAssigneesParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesAddAssigneesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes one or more assignees from an issue. + * + * This example removes two of three assignees, leaving the `octocat` assignee. + */ + removeAssignees: { + (params?: Octokit.IssuesRemoveAssigneesParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesRemoveAssigneesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Issue Comments are ordered by ascending ID. + */ + listComments: { + (params?: Octokit.IssuesListCommentsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesListCommentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * By default, Issue Comments are ordered by ascending ID. + */ + listCommentsForRepo: { + (params?: Octokit.IssuesListCommentsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + (params?: Octokit.IssuesGetCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createComment: { + (params?: Octokit.IssuesCreateCommentParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesCreateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + (params?: Octokit.IssuesUpdateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + (params?: Octokit.IssuesDeleteCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listEvents: { + (params?: Octokit.IssuesListEventsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesListEventsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listEventsForRepo: { + (params?: Octokit.IssuesListEventsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getEvent: { + (params?: Octokit.IssuesGetEventParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForRepo: { + (params?: Octokit.IssuesListLabelsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLabel: { + (params?: Octokit.IssuesGetLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createLabel: { + (params?: Octokit.IssuesCreateLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateLabel: { + (params?: Octokit.IssuesUpdateLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteLabel: { + (params?: Octokit.IssuesDeleteLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listLabelsOnIssue: { + (params?: Octokit.IssuesListLabelsOnIssueParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesListLabelsOnIssueParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + addLabels: { + (params?: Octokit.IssuesAddLabelsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesAddLabelsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + removeLabel: { + (params?: Octokit.IssuesRemoveLabelParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesRemoveLabelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + replaceLabels: { + (params?: Octokit.IssuesReplaceLabelsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesReplaceLabelsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + removeLabels: { + (params?: Octokit.IssuesRemoveLabelsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesRemoveLabelsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listLabelsForMilestone: { + ( + params?: Octokit.IssuesListLabelsForMilestoneParamsDeprecatedNumber + ): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesListLabelsForMilestoneParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listMilestonesForRepo: { + (params?: Octokit.IssuesListMilestonesForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getMilestone: { + (params?: Octokit.IssuesGetMilestoneParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesGetMilestoneParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createMilestone: { + (params?: Octokit.IssuesCreateMilestoneParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateMilestone: { + (params?: Octokit.IssuesUpdateMilestoneParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesUpdateMilestoneParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteMilestone: { + (params?: Octokit.IssuesDeleteMilestoneParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.IssuesDeleteMilestoneParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listEventsForTimeline: { + ( + params?: Octokit.IssuesListEventsForTimelineParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.IssuesListEventsForTimelineParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + licenses: { + listCommonlyUsed: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + list: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.LicensesGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. + */ + getForRepo: { + (params?: Octokit.LicensesGetForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + markdown: { + render: { + (params?: Octokit.MarkdownRenderParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + renderRaw: { + (params?: Octokit.MarkdownRenderRawParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + meta: { + /** + * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." + */ + get: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + migrations: { + /** + * Initiates the generation of a migration archive. + */ + startForOrg: { + (params?: Octokit.MigrationsStartForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the most recent migrations. + */ + listForOrg: { + (params?: Octokit.MigrationsListForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + getStatusForOrg: { + (params?: Octokit.MigrationsGetStatusForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the URL to a migration archive. + */ + getArchiveForOrg: { + (params?: Octokit.MigrationsGetArchiveForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + (params?: Octokit.MigrationsDeleteArchiveForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + unlockRepoForOrg: { + (params?: Octokit.MigrationsUnlockRepoForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Start a source import to a GitHub repository using GitHub Importer. + */ + startImport: { + (params?: Octokit.MigrationsStartImportParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + getImportProgress: { + (params?: Octokit.MigrationsGetImportProgressParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted. + * + * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. + * + * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: + * + * To restart an import, no parameters are provided in the update request. + */ + updateImport: { + (params?: Octokit.MigrationsUpdateImportParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This API method and the "Map a commit author" method allow you to provide correct Git author information. + */ + getCommitAuthors: { + (params?: Octokit.MigrationsGetCommitAuthorsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + mapCommitAuthor: { + (params?: Octokit.MigrationsMapCommitAuthorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). + */ + setLfsPreference: { + (params?: Octokit.MigrationsSetLfsPreferenceParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List files larger than 100MB found during the import + */ + getLargeFiles: { + (params?: Octokit.MigrationsGetLargeFilesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Stop an import for a repository. + */ + cancelImport: { + (params?: Octokit.MigrationsCancelImportParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Initiates the generation of a user migration archive. + */ + startForAuthenticatedUser: { + (params?: Octokit.MigrationsStartForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + (params?: Octokit.MigrationsListForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). + */ + getStatusForAuthenticatedUser: { + (params?: Octokit.MigrationsGetStatusForAuthenticatedUserParams): Promise< + Octokit.Response< + Octokit.MigrationsGetStatusForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + getArchiveForAuthenticatedUser: { + ( + params?: Octokit.MigrationsGetArchiveForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.MigrationsGetArchiveForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [Get a list of user migrations](https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. + */ + deleteArchiveForAuthenticatedUser: { + ( + params?: Octokit.MigrationsDeleteArchiveForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.MigrationsDeleteArchiveForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + */ + unlockRepoForAuthenticatedUser: { + ( + params?: Octokit.MigrationsUnlockRepoForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.MigrationsUnlockRepoForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + }; + oauthAuthorizations: { + /** + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + */ + listGrants: { + (params?: Octokit.OauthAuthorizationsListGrantsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getGrant: { + (params?: Octokit.OauthAuthorizationsGetGrantParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + deleteGrant: { + (params?: Octokit.OauthAuthorizationsDeleteGrantParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listAuthorizations: { + (params?: Octokit.OauthAuthorizationsListAuthorizationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getAuthorization: { + (params?: Octokit.OauthAuthorizationsGetAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * You can use this endpoint to create multiple OAuth tokens instead of implementing the [web flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/). + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + createAuthorization: { + (params?: Octokit.OauthAuthorizationsCreateAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + */ + getOrCreateAuthorizationForApp: { + ( + params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + */ + getOrCreateAuthorizationForAppAndFingerprint: { + ( + params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + */ + getOrCreateAuthorizationForAppFingerprint: { + ( + params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + updateAuthorization: { + (params?: Octokit.OauthAuthorizationsUpdateAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteAuthorization: { + (params?: Octokit.OauthAuthorizationsDeleteAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth applications can use a special API method for checking OAuth token validity without running afoul of normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing it, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + checkAuthorization: { + (params?: Octokit.OauthAuthorizationsCheckAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth applications can use this API method to reset a valid OAuth token without end user involvement. Applications must save the "token" property in the response, because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing it, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + resetAuthorization: { + (params?: Octokit.OauthAuthorizationsResetAuthorizationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) for this method, where the username is the OAuth application `client_id` and the password is its `client_secret`. + */ + revokeAuthorizationForApplication: { + ( + params?: Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) for this method, where the username is the OAuth application `client_id` and the password is its `client_secret`. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + revokeGrantForApplication: { + ( + params?: Octokit.OauthAuthorizationsRevokeGrantForApplicationParams + ): Promise< + Octokit.Response< + Octokit.OauthAuthorizationsRevokeGrantForApplicationResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + }; + orgs: { + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + listForAuthenticatedUser: { + (params?: Octokit.OrgsListForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. + */ + list: { + (params?: Octokit.OrgsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. + */ + listForUser: { + (params?: Octokit.OrgsListForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." + */ + get: { + (params?: Octokit.OrgsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The new `members_allowed_repository_creation_type` replaces the functionality of `members_can_create_repositories`. + * + * Setting `members_allowed_repository_creation_type` will override the value of `members_can_create_repositories` in the following ways: + * + * * Setting `members_allowed_repository_creation_type` to `all` or `private` sets `members_can_create_repositories` to `true`. + * * Setting `members_allowed_repository_creation_type` to `none` sets `members_can_create_repositories` to `false`. + * * If you omit `members_allowed_repository_creation_type`, `members_can_create_repositories` is not modified. + */ + update: { + (params?: Octokit.OrgsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users blocked by an organization. + */ + listBlockedUsers: { + (params?: Octokit.OrgsListBlockedUsersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlockedUser: { + (params?: Octokit.OrgsCheckBlockedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + blockUser: { + (params?: Octokit.OrgsBlockUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblockUser: { + (params?: Octokit.OrgsUnblockUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.OrgsListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.OrgsGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + (params?: Octokit.OrgsCreateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + (params?: Octokit.OrgsUpdateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.OrgsPingHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + (params?: Octokit.OrgsDeleteHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + listMembers: { + (params?: Octokit.OrgsListMembersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Check if a user is, publicly or privately, a member of the organization. + */ + checkMembership: { + (params?: Octokit.OrgsCheckMembershipParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + removeMember: { + (params?: Octokit.OrgsRemoveMemberParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + (params?: Octokit.OrgsListPublicMembersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + checkPublicMembership: { + (params?: Octokit.OrgsCheckPublicMembershipParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + publicizeMembership: { + (params?: Octokit.OrgsPublicizeMembershipParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + concealMembership: { + (params?: Octokit.OrgsConcealMembershipParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. + */ + getMembership: { + (params?: Octokit.OrgsGetMembershipParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + addOrUpdateMembership: { + (params?: Octokit.OrgsAddOrUpdateMembershipParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + removeMembership: { + (params?: Octokit.OrgsRemoveMembershipParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + listInvitationTeams: { + (params?: Octokit.OrgsListInvitationTeamsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { + (params?: Octokit.OrgsListPendingInvitationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createInvitation: { + (params?: Octokit.OrgsCreateInvitationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listMemberships: { + (params?: Octokit.OrgsListMembershipsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getMembershipForAuthenticatedUser: { + (params?: Octokit.OrgsGetMembershipForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateMembership: { + (params?: Octokit.OrgsUpdateMembershipParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + (params?: Octokit.OrgsListOutsideCollaboratorsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { + (params?: Octokit.OrgsRemoveOutsideCollaboratorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". + */ + convertMemberToOutsideCollaborator: { + (params?: Octokit.OrgsConvertMemberToOutsideCollaboratorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + projects: { + /** + * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForRepo: { + (params?: Octokit.ProjectsListForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * + * s + */ + listForOrg: { + (params?: Octokit.ProjectsListForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listForUser: { + (params?: Octokit.ProjectsListForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: { + (params?: Octokit.ProjectsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForRepo: { + (params?: Octokit.ProjectsCreateForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForOrg: { + (params?: Octokit.ProjectsCreateForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + createForAuthenticatedUser: { + (params?: Octokit.ProjectsCreateForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + update: { + (params?: Octokit.ProjectsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: { + (params?: Octokit.ProjectsDeleteParams): Promise; + + endpoint: Octokit.Endpoint; + }; + + listCards: { + (params?: Octokit.ProjectsListCardsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getCard: { + (params?: Octokit.ProjectsGetCardParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + */ + createCard: { + (params?: Octokit.ProjectsCreateCardParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateCard: { + (params?: Octokit.ProjectsUpdateCardParams): Promise; + + endpoint: Octokit.Endpoint; + }; + + deleteCard: { + (params?: Octokit.ProjectsDeleteCardParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + moveCard: { + (params?: Octokit.ProjectsMoveCardParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + listCollaborators: { + (params?: Octokit.ProjectsListCollaboratorsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + reviewUserPermissionLevel: { + (params?: Octokit.ProjectsReviewUserPermissionLevelParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + addCollaborator: { + (params?: Octokit.ProjectsAddCollaboratorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + removeCollaborator: { + (params?: Octokit.ProjectsRemoveCollaboratorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listColumns: { + (params?: Octokit.ProjectsListColumnsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getColumn: { + (params?: Octokit.ProjectsGetColumnParams): Promise; + + endpoint: Octokit.Endpoint; + }; + + createColumn: { + (params?: Octokit.ProjectsCreateColumnParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + updateColumn: { + (params?: Octokit.ProjectsUpdateColumnParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + deleteColumn: { + (params?: Octokit.ProjectsDeleteColumnParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + moveColumn: { + (params?: Octokit.ProjectsMoveColumnParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + pulls: { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + list: { + (params?: Octokit.PullsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + get: { + (params?: Octokit.PullsGetParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + create: { + (params?: Octokit.PullsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createFromIssue: { + (params?: Octokit.PullsCreateFromIssueParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + updateBranch: { + (params?: Octokit.PullsUpdateBranchParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + update: { + (params?: Octokit.PullsUpdateParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). + */ + listCommits: { + (params?: Octokit.PullsListCommitsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsListCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** The response includes a maximum of 300 files. + */ + listFiles: { + (params?: Octokit.PullsListFilesParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsListFilesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + checkIfMerged: { + (params?: Octokit.PullsCheckIfMergedParamsDeprecatedNumber): Promise< + Octokit.AnyResponse + >; + (params?: Octokit.PullsCheckIfMergedParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + merge: { + (params?: Octokit.PullsMergeParamsDeprecatedNumber): Promise< + Octokit.AnyResponse + >; + (params?: Octokit.PullsMergeParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * By default, review comments are ordered by ascending ID. + */ + listComments: { + (params?: Octokit.PullsListCommentsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsListCommentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * By default, review comments are ordered by ascending ID. + */ + listCommentsForRepo: { + (params?: Octokit.PullsListCommentsForRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getComment: { + (params?: Octokit.PullsGetCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + createComment: { + (params?: Octokit.PullsCreateCommentParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsCreateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + createCommentReply: { + (params?: Octokit.PullsCreateCommentReplyParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsCreateCommentReplyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateComment: { + (params?: Octokit.PullsUpdateCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteComment: { + (params?: Octokit.PullsDeleteCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listReviewRequests: { + (params?: Octokit.PullsListReviewRequestsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsListReviewRequestsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createReviewRequest: { + ( + params?: Octokit.PullsCreateReviewRequestParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.PullsCreateReviewRequestParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteReviewRequest: { + ( + params?: Octokit.PullsDeleteReviewRequestParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.PullsDeleteReviewRequestParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The list of reviews returns in chronological order. + */ + listReviews: { + (params?: Octokit.PullsListReviewsParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsListReviewsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getReview: { + (params?: Octokit.PullsGetReviewParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsGetReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deletePendingReview: { + ( + params?: Octokit.PullsDeletePendingReviewParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.PullsDeletePendingReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getCommentsForReview: { + ( + params?: Octokit.PullsGetCommentsForReviewParamsDeprecatedNumber + ): Promise>; + (params?: Octokit.PullsGetCommentsForReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + createReview: { + (params?: Octokit.PullsCreateReviewParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsCreateReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Update the review summary comment with new text. + */ + updateReview: { + (params?: Octokit.PullsUpdateReviewParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsUpdateReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + submitReview: { + (params?: Octokit.PullsSubmitReviewParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsSubmitReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. + */ + dismissReview: { + (params?: Octokit.PullsDismissReviewParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.PullsDismissReviewParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + rateLimit: { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Understanding your rate limit status** + * + * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. + * + * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: + * + * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. + * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). + * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). + * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. + * + * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." + * + * The `rate` object (shown at the bottom of the response above) is deprecated. + * + * If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + reactions: { + /** + * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). + */ + listForCommitComment: { + (params?: Octokit.ReactionsListForCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. + */ + createForCommitComment: { + (params?: Octokit.ReactionsCreateForCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue](https://developer.github.com/v3/issues/). + */ + listForIssue: { + (params?: Octokit.ReactionsListForIssueParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.ReactionsListForIssueParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. + */ + createForIssue: { + (params?: Octokit.ReactionsCreateForIssueParamsDeprecatedNumber): Promise< + Octokit.Response + >; + (params?: Octokit.ReactionsCreateForIssueParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). + */ + listForIssueComment: { + (params?: Octokit.ReactionsListForIssueCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. + */ + createForIssueComment: { + (params?: Octokit.ReactionsCreateForIssueCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). + */ + listForPullRequestReviewComment: { + ( + params?: Octokit.ReactionsListForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsListForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. + */ + createForPullRequestReviewComment: { + ( + params?: Octokit.ReactionsCreateForPullRequestReviewCommentParams + ): Promise< + Octokit.Response< + Octokit.ReactionsCreateForPullRequestReviewCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listForTeamDiscussion: { + (params?: Octokit.ReactionsListForTeamDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + */ + createForTeamDiscussion: { + (params?: Octokit.ReactionsCreateForTeamDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listForTeamDiscussionComment: { + (params?: Octokit.ReactionsListForTeamDiscussionCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + */ + createForTeamDiscussionComment: { + (params?: Octokit.ReactionsCreateForTeamDiscussionCommentParams): Promise< + Octokit.Response< + Octokit.ReactionsCreateForTeamDiscussionCommentResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). + */ + delete: { + (params?: Octokit.ReactionsDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + repos: { + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + list: { + (params?: Octokit.ReposListParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public repositories for the specified user. + */ + listForUser: { + (params?: Octokit.ReposListForUserParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists repositories for the specified organization. + */ + listForOrg: { + (params?: Octokit.ReposListForOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. + */ + listPublic: { + (params?: Octokit.ReposListPublicParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + */ + createForAuthenticatedUser: { + (params?: Octokit.ReposCreateForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + */ + createInOrg: { + (params?: Octokit.ReposCreateInOrgParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new repository using a repository template. Use the `repo` route parameter to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [`GET /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + * + * \` + */ + createUsingTemplate: { + (params?: Octokit.ReposCreateUsingTemplateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + */ + get: { + (params?: Octokit.ReposGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). + */ + update: { + (params?: Octokit.ReposUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listTopics: { + (params?: Octokit.ReposListTopicsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + replaceTopics: { + (params?: Octokit.ReposReplaceTopicsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + checkVulnerabilityAlerts: { + (params?: Octokit.ReposCheckVulnerabilityAlertsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + enableVulnerabilityAlerts: { + (params?: Octokit.ReposEnableVulnerabilityAlertsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Disables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + */ + disableVulnerabilityAlerts: { + (params?: Octokit.ReposDisableVulnerabilityAlertsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + enableAutomatedSecurityFixes: { + (params?: Octokit.ReposEnableAutomatedSecurityFixesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + */ + disableAutomatedSecurityFixes: { + (params?: Octokit.ReposDisableAutomatedSecurityFixesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + listContributors: { + (params?: Octokit.ReposListContributorsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + listLanguages: { + (params?: Octokit.ReposListLanguagesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listTeams: { + (params?: Octokit.ReposListTeamsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listTags: { + (params?: Octokit.ReposListTagsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + */ + delete: { + (params?: Octokit.ReposDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). + */ + transfer: { + (params?: Octokit.ReposTransferParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listBranches: { + (params?: Octokit.ReposListBranchesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getBranch: { + (params?: Octokit.ReposGetBranchParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getBranchProtection: { + (params?: Octokit.ReposGetBranchProtectionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users and teams in total is limited to 100 items. + */ + updateBranchProtection: { + (params?: Octokit.ReposUpdateBranchProtectionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeBranchProtection: { + (params?: Octokit.ReposRemoveBranchProtectionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.ReposGetProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + updateProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.ReposUpdateProtectedBranchRequiredStatusChecksParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchRequiredStatusChecksResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecks: { + ( + params?: Octokit.ReposRemoveProtectedBranchRequiredStatusChecksParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + listProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.ReposListProtectedBranchRequiredStatusChecksContextsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + replaceProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + addProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecksContexts: { + ( + params?: Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + updateProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + Octokit.Response< + Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + removeProtectedBranchPullRequestReviewEnforcement: { + ( + params?: Octokit.ReposRemoveProtectedBranchPullRequestReviewEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + getProtectedBranchRequiredSignatures: { + ( + params?: Octokit.ReposGetProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposGetProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + addProtectedBranchRequiredSignatures: { + ( + params?: Octokit.ReposAddProtectedBranchRequiredSignaturesParams + ): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchRequiredSignaturesResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + removeProtectedBranchRequiredSignatures: { + ( + params?: Octokit.ReposRemoveProtectedBranchRequiredSignaturesParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + */ + getProtectedBranchAdminEnforcement: { + (params?: Octokit.ReposGetProtectedBranchAdminEnforcementParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + addProtectedBranchAdminEnforcement: { + (params?: Octokit.ReposAddProtectedBranchAdminEnforcementParams): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchAdminEnforcementResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + removeProtectedBranchAdminEnforcement: { + ( + params?: Octokit.ReposRemoveProtectedBranchAdminEnforcementParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * **Note**: Teams and users `restrictions` are only available for organization-owned repositories. + */ + getProtectedBranchRestrictions: { + (params?: Octokit.ReposGetProtectedBranchRestrictionsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + removeProtectedBranchRestrictions: { + (params?: Octokit.ReposRemoveProtectedBranchRestrictionsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. + */ + listProtectedBranchTeamRestrictions: { + ( + params?: Octokit.ReposListProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposListProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. If you pass the `hellcat-preview` media type, you can include child teams. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | + */ + replaceProtectedBranchTeamRestrictions: { + ( + params?: Octokit.ReposReplaceProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. If you pass the `hellcat-preview` media type, you can also give push access to child teams. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | + */ + addProtectedBranchTeamRestrictions: { + (params?: Octokit.ReposAddProtectedBranchTeamRestrictionsParams): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. If you pass the `hellcat-preview` media type, you can include child teams. + * + * | Type | Description | + * | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | + */ + removeProtectedBranchTeamRestrictions: { + ( + params?: Octokit.ReposRemoveProtectedBranchTeamRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchTeamRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + listProtectedBranchUserRestrictions: { + ( + params?: Octokit.ReposListProtectedBranchUserRestrictionsParams + ): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users and teams in total is limited to 100 items. | + */ + replaceProtectedBranchUserRestrictions: { + ( + params?: Octokit.ReposReplaceProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposReplaceProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users and teams in total is limited to 100 items. | + */ + addProtectedBranchUserRestrictions: { + (params?: Octokit.ReposAddProtectedBranchUserRestrictionsParams): Promise< + Octokit.Response< + Octokit.ReposAddProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. + * + * | Type | Description | + * | ------- | -------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users and teams in total is limited to 100 items. | + */ + removeProtectedBranchUserRestrictions: { + ( + params?: Octokit.ReposRemoveProtectedBranchUserRestrictionsParams + ): Promise< + Octokit.Response< + Octokit.ReposRemoveProtectedBranchUserRestrictionsResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + listCollaborators: { + (params?: Octokit.ReposListCollaboratorsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + checkCollaborator: { + (params?: Octokit.ReposCheckCollaboratorParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. + */ + getCollaboratorPermissionLevel: { + (params?: Octokit.ReposGetCollaboratorPermissionLevelParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://developer.github.com/v3/repos/invitations/). + * + * **Rate limits** + * + * To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + addCollaborator: { + (params?: Octokit.ReposAddCollaboratorParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + removeCollaborator: { + (params?: Octokit.ReposRemoveCollaboratorParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). + * + * Comments are ordered by ascending ID. + */ + listCommitComments: { + (params?: Octokit.ReposListCommitCommentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + listCommentsForCommit: { + (params?: Octokit.ReposListCommentsForCommitParamsDeprecatedRef): Promise< + Octokit.Response + >; + (params?: Octokit.ReposListCommentsForCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createCommitComment: { + (params?: Octokit.ReposCreateCommitCommentParamsDeprecatedSha): Promise< + Octokit.Response + >; + (params?: Octokit.ReposCreateCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getCommitComment: { + (params?: Octokit.ReposGetCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateCommitComment: { + (params?: Octokit.ReposUpdateCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteCommitComment: { + (params?: Octokit.ReposDeleteCommitCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + listCommits: { + (params?: Octokit.ReposListCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * You can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + getCommit: { + (params?: Octokit.ReposGetCommitParamsDeprecatedCommitSha): Promise< + Octokit.Response + >; + (params?: Octokit.ReposGetCommitParamsDeprecatedSha): Promise< + Octokit.Response + >; + (params?: Octokit.ReposGetCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: + * + * ``` + * application/vnd.github.VERSION.sha + * + * ``` + * + * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. + */ + getCommitRefSha: { + (params?: Octokit.ReposGetCommitRefShaParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. + * + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommits: { + (params?: Octokit.ReposCompareCommitsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + listBranchesForHeadCommit: { + (params?: Octokit.ReposListBranchesForHeadCommitParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. + */ + listPullRequestsAssociatedWithCommit: { + ( + params?: Octokit.ReposListPullRequestsAssociatedWithCommitParams + ): Promise< + Octokit.Response< + Octokit.ReposListPullRequestsAssociatedWithCommitResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. + */ + retrieveCommunityProfileMetrics: { + (params?: Octokit.ReposRetrieveCommunityProfileMetricsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. + */ + getReadme: { + (params?: Octokit.ReposGetReadmeParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository. + * + * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format. + * + * **Note**: + * + * * To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * The response will be an array of objects, one object for each item in the directory. + * + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule". + * + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). + * + * Otherwise, the API responds with an object describing the symlink itself: + * + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values. + */ + getContents: { + (params?: Octokit.ReposGetContentsParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + */ + createOrUpdateFile: { + (params?: Octokit.ReposCreateOrUpdateFileParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + */ + createFile: { + (params?: Octokit.ReposCreateFileParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new file or updates an existing file in a repository. + */ + updateFile: { + (params?: Octokit.ReposUpdateFileParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + deleteFile: { + (params?: Octokit.ReposDeleteFileParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request. + * + * _Note_: For private repositories, these links are temporary and expire after five minutes. + * + * To follow redirects with curl, use the `-L` switch: + */ + getArchiveLink: { + (params?: Octokit.ReposGetArchiveLinkParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Simple filtering of deployments is available via query parameters: + */ + listDeployments: { + (params?: Octokit.ReposListDeploymentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getDeployment: { + (params?: Octokit.ReposGetDeploymentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deployments offer a few configurable parameters with sane defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. + * + * By default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref: + * + * A simple example putting the user and room into the payload to notify back to chat networks. + * + * A more advanced example specifying required commit statuses and bypassing auto-merging. + * + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when: + * + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master`in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful response. + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + createDeployment: { + (params?: Octokit.ReposCreateDeploymentParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view deployment statuses for a deployment: + */ + listDeploymentStatuses: { + (params?: Octokit.ReposListDeploymentStatusesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access can view a deployment status for a deployment: + */ + getDeploymentStatus: { + (params?: Octokit.ReposGetDeploymentStatusParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + createDeploymentStatus: { + (params?: Octokit.ReposCreateDeploymentStatusParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listDownloads: { + (params?: Octokit.ReposListDownloadsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getDownload: { + (params?: Octokit.ReposGetDownloadParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteDownload: { + (params?: Octokit.ReposDeleteDownloadParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listForks: { + (params?: Octokit.ReposListForksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://github.com/contact). + */ + createFork: { + (params?: Octokit.ReposCreateForkParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listHooks: { + (params?: Octokit.ReposListHooksParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getHook: { + (params?: Octokit.ReposGetHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. + * + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + (params?: Octokit.ReposCreateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateHook: { + (params?: Octokit.ReposUpdateHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + testPushHook: { + (params?: Octokit.ReposTestPushHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingHook: { + (params?: Octokit.ReposPingHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteHook: { + (params?: Octokit.ReposDeleteHookParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + listInvitations: { + (params?: Octokit.ReposListInvitationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteInvitation: { + (params?: Octokit.ReposDeleteInvitationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateInvitation: { + (params?: Octokit.ReposUpdateInvitationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + listInvitationsForAuthenticatedUser: { + ( + params?: Octokit.ReposListInvitationsForAuthenticatedUserParams + ): Promise< + Octokit.Response< + Octokit.ReposListInvitationsForAuthenticatedUserResponse + > + >; + + endpoint: Octokit.Endpoint; + }; + + acceptInvitation: { + (params?: Octokit.ReposAcceptInvitationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + declineInvitation: { + (params?: Octokit.ReposDeclineInvitationParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listDeployKeys: { + (params?: Octokit.ReposListDeployKeysParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getDeployKey: { + (params?: Octokit.ReposGetDeployKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Here's how you can create a read-only deploy key: + */ + addDeployKey: { + (params?: Octokit.ReposAddDeployKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + removeDeployKey: { + (params?: Octokit.ReposRemoveDeployKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + merge: { + (params?: Octokit.ReposMergeParams): Promise; + + endpoint: Octokit.Endpoint; + }; + + getPages: { + (params?: Octokit.ReposGetPagesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + enablePagesSite: { + (params?: Octokit.ReposEnablePagesSiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + disablePagesSite: { + (params?: Octokit.ReposDisablePagesSiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + updateInformationAboutPagesSite: { + (params?: Octokit.ReposUpdateInformationAboutPagesSiteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + requestPageBuild: { + (params?: Octokit.ReposRequestPageBuildParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listPagesBuilds: { + (params?: Octokit.ReposListPagesBuildsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getLatestPagesBuild: { + (params?: Octokit.ReposGetLatestPagesBuildParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + getPagesBuild: { + (params?: Octokit.ReposGetPagesBuildParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + (params?: Octokit.ReposListReleasesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). + */ + getRelease: { + (params?: Octokit.ReposGetReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + getLatestRelease: { + (params?: Octokit.ReposGetLatestReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a published release with the specified tag. + */ + getReleaseByTag: { + (params?: Octokit.ReposGetReleaseByTagParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createRelease: { + (params?: Octokit.ReposCreateReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release. + */ + updateRelease: { + (params?: Octokit.ReposUpdateReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can delete a release. + */ + deleteRelease: { + (params?: Octokit.ReposDeleteReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listAssetsForRelease: { + (params?: Octokit.ReposListAssetsForReleaseParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. This endpoint is provided by a URI template in [the release's API response](https://developer.github.com/v3/repos/releases/#get-a-single-release). You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * The asset data is expected in its raw binary form, rather than JSON. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. + * + * Send the raw binary content of the asset as the request body. + * + * This may leave an empty asset with a state of `"new"`. It can be safely deleted. + */ + uploadReleaseAsset: { + (params?: Octokit.ReposUploadReleaseAssetParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + getReleaseAsset: { + (params?: Octokit.ReposGetReleaseAssetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + (params?: Octokit.ReposUpdateReleaseAssetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + deleteReleaseAsset: { + (params?: Octokit.ReposDeleteReleaseAssetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * * `total` - The Total number of commits authored by the contributor. + * + * Weekly Hash (`weeks` array): + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + getContributorsStats: { + (params?: Octokit.ReposGetContributorsStatsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + getCommitActivityStats: { + (params?: Octokit.ReposGetCommitActivityStatsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + */ + getCodeFrequencyStats: { + (params?: Octokit.ReposGetCodeFrequencyStatsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + getParticipationStats: { + (params?: Octokit.ReposGetParticipationStatsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + getPunchCardStats: { + (params?: Octokit.ReposGetPunchCardStatsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + createStatus: { + (params?: Octokit.ReposCreateStatusParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + listStatusesForRef: { + (params?: Octokit.ReposListStatusesForRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + getCombinedStatusForRef: { + (params?: Octokit.ReposGetCombinedStatusForRefParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 referrers over the last 14 days. + */ + getTopReferrers: { + (params?: Octokit.ReposGetTopReferrersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the top 10 popular contents over the last 14 days. + */ + getTopPaths: { + (params?: Octokit.ReposGetTopPathsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getViews: { + (params?: Octokit.ReposGetViewsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getClones: { + (params?: Octokit.ReposGetClonesParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + scim: {}; + search: { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. + * + * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: + * + * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. + */ + repos: { + (params?: Octokit.SearchReposParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * **Considerations for commit search** + * + * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * + * Suppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + */ + commits: { + (params?: Octokit.SearchCommitsParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. + * + * **Considerations for code search** + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: + * + * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. + */ + code: { + (params?: Octokit.SearchCodeParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + */ + issuesAndPullRequests: { + (params?: Octokit.SearchIssuesAndPullRequestsParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + */ + issues: { + (params?: Octokit.SearchIssuesParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Imagine you're looking for a list of popular users. You might try out this query: + * + * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. + */ + users: { + (params?: Octokit.SearchUsersParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: + * + * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + * + * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. + */ + topics: { + (params?: Octokit.SearchTopicsParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * The labels that best match for the query appear first in the search results. + */ + labels: { + (params?: Octokit.SearchLabelsParams): Promise; + + endpoint: Octokit.Endpoint; + }; + }; + teams: { + list: { + (params?: Octokit.TeamsListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + get: { + (params?: Octokit.TeamsGetParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + */ + getByName: { + (params?: Octokit.TeamsGetByNameParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To create a team, the authenticated user must be a member or owner of `:org`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + */ + create: { + (params?: Octokit.TeamsCreateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To edit a team, the authenticated user must either be an owner of the org that the team is associated with, or a maintainer of the team. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + update: { + (params?: Octokit.TeamsUpdateParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To delete a team, the authenticated user must be a team maintainer or an owner of the org associated with the team. + * + * If you are an organization owner and you pass the `hellcat-preview` media type, deleting a parent team will delete all of its child teams as well. + */ + delete: { + (params?: Octokit.TeamsDeleteParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * At this time, the `hellcat-preview` media type is required to use this endpoint. + */ + listChild: { + (params?: Octokit.TeamsListChildParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: If you pass the `hellcat-preview` media type, the response will include any repositories inherited through a parent team. + */ + listRepos: { + (params?: Octokit.TeamsListReposParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note**: If you pass the `hellcat-preview` media type, repositories inherited through a parent team will be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + checkManagesRepo: { + (params?: Octokit.TeamsCheckManagesRepoParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * If you pass the `hellcat-preview` media type, you can modify repository permissions of child teams. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + addOrUpdateRepo: { + (params?: Octokit.TeamsAddOrUpdateRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + removeRepo: { + (params?: Octokit.TeamsRemoveRepoParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). + */ + listForAuthenticatedUser: { + (params?: Octokit.TeamsListForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the organization projects for a team. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + */ + listProjects: { + (params?: Octokit.TeamsListProjectsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + */ + reviewProject: { + (params?: Octokit.TeamsReviewProjectParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + addOrUpdateProject: { + (params?: Octokit.TeamsAddOrUpdateProjectParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + removeProject: { + (params?: Octokit.TeamsRemoveProjectParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listDiscussionComments: { + (params?: Octokit.TeamsListDiscussionCommentsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getDiscussionComment: { + (params?: Octokit.TeamsGetDiscussionCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createDiscussionComment: { + (params?: Octokit.TeamsCreateDiscussionCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + updateDiscussionComment: { + (params?: Octokit.TeamsUpdateDiscussionCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteDiscussionComment: { + (params?: Octokit.TeamsDeleteDiscussionCommentParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listDiscussions: { + (params?: Octokit.TeamsListDiscussionsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getDiscussion: { + (params?: Octokit.TeamsGetDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createDiscussion: { + (params?: Octokit.TeamsCreateDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + updateDiscussion: { + (params?: Octokit.TeamsUpdateDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteDiscussion: { + (params?: Octokit.TeamsDeleteDiscussionParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + */ + listMembers: { + (params?: Octokit.TeamsListMembersParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Get team member" API (described below) is deprecated. + * + * We recommend using the [Get team membership API](https://developer.github.com/v3/teams/members/#get-team-membership) instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + getMember: { + (params?: Octokit.TeamsGetMemberParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Add team member" API (described below) is deprecated. + * + * We recommend using the [Add team membership API](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be a team maintainer in the team they're changing or be an owner of the organization that the team is associated with. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + addMember: { + (params?: Octokit.TeamsAddMemberParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The "Remove team member" API (described below) is deprecated. + * + * We recommend using the [Remove team membership endpoint](https://developer.github.com/v3/teams/members/#remove-team-membership) instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + removeMember: { + (params?: Octokit.TeamsRemoveMemberParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + */ + getMembership: { + (params?: Octokit.TeamsGetMembershipParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a maintainer of the team. + */ + addOrUpdateMembership: { + (params?: Octokit.TeamsAddOrUpdateMembershipParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + removeMembership: { + (params?: Octokit.TeamsRemoveMembershipParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { + (params?: Octokit.TeamsListPendingInvitationsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; + users: { + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/users/#response-with-github-plan-information)." + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://developer.github.com/v3/#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://developer.github.com/v3/users/emails/)". + */ + getByUsername: { + (params?: Octokit.UsersGetByUsernameParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists public and private profile information when authenticated through basic auth or OAuth with the `user` scope. + * + * Lists public profile information when authenticated through OAuth without the `user` scope. + */ + getAuthenticated: { + (params?: Octokit.EmptyParams): Promise; + + endpoint: Octokit.Endpoint; + }; + /** + * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + updateAuthenticated: { + (params?: Octokit.UsersUpdateAuthenticatedParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + */ + getContextForUser: { + (params?: Octokit.UsersGetContextForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of users. + */ + list: { + (params?: Octokit.UsersListParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * List the users you've blocked on your personal account. + */ + listBlocked: { + (params?: Octokit.EmptyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * If the user is blocked: + * + * If the user is not blocked: + */ + checkBlocked: { + (params?: Octokit.UsersCheckBlockedParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + block: { + (params?: Octokit.UsersBlockParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + unblock: { + (params?: Octokit.UsersUnblockParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + listEmails: { + (params?: Octokit.UsersListEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope. + */ + listPublicEmails: { + (params?: Octokit.UsersListPublicEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + addEmails: { + (params?: Octokit.UsersAddEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + deleteEmails: { + (params?: Octokit.UsersDeleteEmailsParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Sets the visibility for your primary email addresses. + */ + togglePrimaryEmailVisibility: { + (params?: Octokit.UsersTogglePrimaryEmailVisibilityParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForUser: { + (params?: Octokit.UsersListFollowersForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowersForAuthenticatedUser: { + (params?: Octokit.UsersListFollowersForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForUser: { + (params?: Octokit.UsersListFollowingForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + listFollowingForAuthenticatedUser: { + (params?: Octokit.UsersListFollowingForAuthenticatedUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + + checkFollowing: { + (params?: Octokit.UsersCheckFollowingParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + + checkFollowingForUser: { + (params?: Octokit.UsersCheckFollowingForUserParams): Promise< + Octokit.AnyResponse + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + follow: { + (params?: Octokit.UsersFollowParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + unfollow: { + (params?: Octokit.UsersUnfollowParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the GPG keys for a user. This information is accessible by anyone. + */ + listGpgKeysForUser: { + (params?: Octokit.UsersListGpgKeysForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listGpgKeys: { + (params?: Octokit.UsersListGpgKeysParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getGpgKey: { + (params?: Octokit.UsersGetGpgKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createGpgKey: { + (params?: Octokit.UsersCreateGpgKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteGpgKey: { + (params?: Octokit.UsersDeleteGpgKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + listPublicKeysForUser: { + (params?: Octokit.UsersListPublicKeysForUserParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + listPublicKeys: { + (params?: Octokit.UsersListPublicKeysParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + getPublicKey: { + (params?: Octokit.UsersGetPublicKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + createPublicKey: { + (params?: Octokit.UsersCreatePublicKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + /** + * Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deletePublicKey: { + (params?: Octokit.UsersDeletePublicKeyParams): Promise< + Octokit.Response + >; + + endpoint: Octokit.Endpoint; + }; + }; +} + +export = Octokit; diff --git a/node_modules/@octokit/rest/index.js b/node_modules/@octokit/rest/index.js new file mode 100644 index 000000000..51359a1ad --- /dev/null +++ b/node_modules/@octokit/rest/index.js @@ -0,0 +1,16 @@ +const Octokit = require('./lib/core') + +const CORE_PLUGINS = [ + require('./plugins/log'), + require('./plugins/authentication-deprecated'), // deprecated: remove in v17 + require('./plugins/authentication'), + require('./plugins/pagination'), + require('./plugins/normalize-git-reference-responses'), + require('./plugins/register-endpoints'), + require('./plugins/rest-api-endpoints'), + require('./plugins/validate'), + + require('octokit-pagination-methods') // deprecated: remove in v17 +] + +module.exports = Octokit.plugin(CORE_PLUGINS) diff --git a/node_modules/@octokit/rest/lib/constructor.js b/node_modules/@octokit/rest/lib/constructor.js new file mode 100644 index 000000000..a62cea19e --- /dev/null +++ b/node_modules/@octokit/rest/lib/constructor.js @@ -0,0 +1,26 @@ +module.exports = Octokit + +const { request } = require('@octokit/request') +const Hook = require('before-after-hook') + +const parseClientOptions = require('./parse-client-options') + +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 +} diff --git a/node_modules/@octokit/rest/lib/core.js b/node_modules/@octokit/rest/lib/core.js new file mode 100644 index 000000000..23df1a620 --- /dev/null +++ b/node_modules/@octokit/rest/lib/core.js @@ -0,0 +1,3 @@ +const factory = require('./factory') + +module.exports = factory() diff --git a/node_modules/@octokit/rest/lib/factory.js b/node_modules/@octokit/rest/lib/factory.js new file mode 100644 index 000000000..c56b3e7e4 --- /dev/null +++ b/node_modules/@octokit/rest/lib/factory.js @@ -0,0 +1,10 @@ +module.exports = factory + +const Octokit = require('./constructor') +const registerPlugin = require('./register-plugin') + +function factory (plugins) { + const Api = Octokit.bind(null, plugins || []) + Api.plugin = registerPlugin.bind(null, plugins || []) + return Api +} diff --git a/node_modules/@octokit/rest/lib/parse-client-options.js b/node_modules/@octokit/rest/lib/parse-client-options.js new file mode 100644 index 000000000..bacea8f1c --- /dev/null +++ b/node_modules/@octokit/rest/lib/parse-client-options.js @@ -0,0 +1,64 @@ +module.exports = parseOptions + +const { Deprecation } = require('deprecation') +const getUserAgent = require('universal-user-agent') +const once = require('once') + +const pkg = require('../package.json') + +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.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 +} diff --git a/node_modules/@octokit/rest/lib/register-plugin.js b/node_modules/@octokit/rest/lib/register-plugin.js new file mode 100644 index 000000000..c644c2962 --- /dev/null +++ b/node_modules/@octokit/rest/lib/register-plugin.js @@ -0,0 +1,7 @@ +module.exports = registerPlugin + +const factory = require('./factory') + +function registerPlugin (plugins, pluginFunction) { + return factory(plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction)) +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/.travis.yml b/node_modules/@octokit/rest/node_modules/universal-user-agent/.travis.yml new file mode 100644 index 000000000..ebafc54d6 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/.travis.yml @@ -0,0 +1,35 @@ +language: node_js +cache: npm + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +stages: + - test + - name: release + if: branch = master AND type IN (push) + +jobs: + include: + - stage: test + node_js: 12 + script: npm run test + - node_js: 8 + script: npm run test + - node_js: 10 + env: Node 10 & coverage upload + script: + - npm run test + - npm run coverage:upload + - node_js: lts/* + env: browser tests + script: npm run test:browser + + - stage: release + node_js: lts/* + env: semantic-release + script: npm run semantic-release diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 000000000..f105ab0c0 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md new file mode 100644 index 000000000..59e809ed8 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const getUserAgent = require('universal-user-agent') +const userAgent = getUserAgent() + +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/browser.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/browser.js new file mode 100644 index 000000000..eb1274439 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/browser.js @@ -0,0 +1,6 @@ +module.exports = getUserAgentBrowser + +function getUserAgentBrowser () { + /* global navigator */ + return navigator.userAgent +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/cypress.json b/node_modules/@octokit/rest/node_modules/universal-user-agent/cypress.json new file mode 100644 index 000000000..a1ff4b85e --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/cypress.json @@ -0,0 +1,4 @@ +{ + "integrationFolder": "test", + "video": false +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/index.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 000000000..04dfc0435 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1 @@ +export default function getUserAgentNode(): string; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/index.js new file mode 100644 index 000000000..ef2d06b28 --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/index.js @@ -0,0 +1,15 @@ +module.exports = getUserAgentNode + +const osName = require('os-name') + +function getUserAgentNode () { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return 'Windows ' + } + + throw error + } +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json b/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json new file mode 100644 index 000000000..fa5d05f8e --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json @@ -0,0 +1,82 @@ +{ + "_from": "universal-user-agent@^3.0.0", + "_id": "universal-user-agent@3.0.0", + "_inBundle": false, + "_integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "_location": "/@octokit/rest/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "universal-user-agent@^3.0.0", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "_shasum": "4cc88d68097bffd7ac42e3b7c903e7481424b4b9", + "_spec": "universal-user-agent@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "os-name": "^3.0.0" + }, + "deprecated": false, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.2", + "cypress": "^3.1.0", + "mocha": "^6.0.0", + "nyc": "^14.0.0", + "proxyquire": "^2.1.0", + "semantic-release": "^15.9.15", + "sinon": "^7.2.4", + "sinon-chai": "^3.2.0", + "standard": "^13.0.1", + "test": "^0.6.0", + "travis-deploy-once": "^5.0.7" + }, + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "universal-user-agent", + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "scripts": { + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "nyc mocha \"test/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "travis-deploy-once": "travis-deploy-once" + }, + "standard": { + "globals": [ + "describe", + "it", + "beforeEach", + "afterEach", + "expect" + ] + }, + "types": "index.d.ts", + "version": "3.0.0" +} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/test/smoke-test.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/test/smoke-test.js new file mode 100644 index 000000000..d71b2d51c --- /dev/null +++ b/node_modules/@octokit/rest/node_modules/universal-user-agent/test/smoke-test.js @@ -0,0 +1,57 @@ +// make tests run in both Node & Express +if (!global.cy) { + const chai = require('chai') + const sinon = require('sinon') + const sinonChai = require('sinon-chai') + chai.use(sinonChai) + global.expect = chai.expect + + let sandbox + beforeEach(() => { + sandbox = sinon.createSandbox() + global.cy = { + stub: function () { + return sandbox.stub.apply(sandbox, arguments) + }, + log () { + console.log.apply(console, arguments) + } + } + }) + + afterEach(() => { + sandbox.restore() + }) +} + +const getUserAgent = require('..') + +describe('smoke', () => { + it('works', () => { + expect(getUserAgent()).to.be.a('string') + expect(getUserAgent().length).to.be.above(10) + }) + + if (!process.browser) { // test on node only + const proxyquire = require('proxyquire').noCallThru() + it('works around wmic error on Windows (#5)', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('Command failed: wmic os get Caption') + } + }) + + expect(getUserAgent()).to.equal('Windows ') + }) + + it('does not swallow unexpected errors', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('oops') + } + }) + + expect(getUserAgent).to.throw('oops') + }) + } +}) diff --git a/node_modules/@octokit/rest/package.json b/node_modules/@octokit/rest/package.json new file mode 100644 index 000000000..d83dca482 --- /dev/null +++ b/node_modules/@octokit/rest/package.json @@ -0,0 +1,186 @@ +{ + "_from": "@octokit/rest@^16.15.0", + "_id": "@octokit/rest@16.28.7", + "_inBundle": false, + "_integrity": "sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA==", + "_location": "/@octokit/rest", + "_phantomChildren": { + "os-name": "3.1.0" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "@octokit/rest@^16.15.0", + "name": "@octokit/rest", + "escapedName": "@octokit%2frest", + "scope": "@octokit", + "rawSpec": "^16.15.0", + "saveSpec": null, + "fetchSpec": "^16.15.0" + }, + "_requiredBy": [ + "/@actions/github" + ], + "_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.7.tgz", + "_shasum": "a2c2db5b318da84144beba82d19c1a9dbdb1a1fa", + "_spec": "@octokit/rest@^16.15.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\toolkit\\actions-github-0.0.0.tgz", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/octokit/rest.js/issues" + }, + "bundleDependencies": false, + "bundlesize": [ + { + "path": "./dist/octokit-rest.min.js.gz", + "maxSize": "33 kB" + } + ], + "contributors": [ + { + "name": "Mike de Boer", + "email": "info@mikedeboer.nl" + }, + { + "name": "Fabian Jakobs", + "email": "fabian@c9.io" + }, + { + "name": "Joe Gallo", + "email": "joe@brassafrax.com" + }, + { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + } + ], + "dependencies": { + "@octokit/request": "^5.0.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^3.0.0", + "url-template": "^2.0.8" + }, + "deprecated": false, + "description": "GitHub REST API client for Node.js", + "devDependencies": { + "@gimenete/type-writer": "^0.1.3", + "@octokit/fixtures-server": "^5.0.1", + "@octokit/routes": "20.9.2", + "@types/node": "^12.0.0", + "bundlesize": "^0.18.0", + "chai": "^4.1.2", + "compression-webpack-plugin": "^3.0.0", + "coveralls": "^3.0.0", + "glob": "^7.1.2", + "http-proxy-agent": "^2.1.0", + "lodash.camelcase": "^4.3.0", + "lodash.merge": "^4.6.1", + "lodash.upperfirst": "^4.3.1", + "mkdirp": "^0.5.1", + "mocha": "^6.0.0", + "mustache": "^3.0.0", + "nock": "^10.0.0", + "npm-run-all": "^4.1.2", + "nyc": "^14.0.0", + "prettier": "^1.14.2", + "proxy": "^0.2.4", + "semantic-release": "^15.0.0", + "sinon": "^7.2.4", + "sinon-chai": "^3.0.0", + "sort-keys": "^3.0.0", + "standard": "^13.0.1", + "string-to-arraybuffer": "^1.0.0", + "string-to-jsdoc-comment": "^1.0.0", + "typescript": "^3.3.1", + "webpack": "^4.0.0", + "webpack-bundle-analyzer": "^3.0.0", + "webpack-cli": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib", + "plugins" + ], + "homepage": "https://github.com/octokit/rest.js#readme", + "keywords": [ + "octokit", + "github", + "rest", + "api-client" + ], + "license": "MIT", + "name": "@octokit/rest", + "nyc": { + "ignore": [ + "test" + ] + }, + "publishConfig": { + "access": "public" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*", + "!dist/*.map.gz" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/octokit/rest.js.git" + }, + "scripts": { + "build": "npm-run-all build:*", + "build:browser": "npm-run-all build:browser:*", + "build:browser:development": "webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json", + "build:browser:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map", + "build:ts": "node scripts/generate-types", + "coverage": "nyc report --reporter=html && open coverage/index.html", + "generate-bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", + "generate-routes": "node scripts/generate-routes", + "postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts", + "prebuild:browser": "mkdirp dist/", + "pretest": "standard", + "prevalidate:ts": "npm run -s build:ts", + "start-fixtures-server": "octokit-fixtures-server", + "test": "nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "test:memory": "mocha test/memory-test", + "validate:ts": "tsc --target es6 --noImplicitAny index.d.ts" + }, + "standard": { + "globals": [ + "describe", + "before", + "beforeEach", + "afterEach", + "after", + "it", + "expect", + "cy" + ], + "ignore": [ + "/docs" + ] + }, + "types": "index.d.ts", + "version": "16.28.7" +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js new file mode 100644 index 000000000..07b75f8d4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js @@ -0,0 +1,41 @@ +module.exports = authenticate + +const { Deprecation } = require('deprecation') +const once = require('once') + +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 +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js new file mode 100644 index 000000000..d47ccdae2 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js @@ -0,0 +1,40 @@ +module.exports = authenticationBeforeRequest + +const btoa = require('btoa-lite') +const uniq = require('lodash.uniq') + +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}` +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js new file mode 100644 index 000000000..6793b30fb --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js @@ -0,0 +1,26 @@ +module.exports = authenticationPlugin + +const { Deprecation } = require('deprecation') +const once = require('once') + +const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)) + +const authenticate = require('./authenticate') +const beforeRequest = require('./before-request') +const requestError = require('./request-error') + +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)) +} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js new file mode 100644 index 000000000..013259257 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js @@ -0,0 +1,39 @@ +module.exports = authenticationRequestError + +const { RequestError } = require('@octokit/request-error') + +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) + }) +} diff --git a/node_modules/@octokit/rest/plugins/authentication/before-request.js b/node_modules/@octokit/rest/plugins/authentication/before-request.js new file mode 100644 index 000000000..21f0db79f --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/before-request.js @@ -0,0 +1,61 @@ +module.exports = authenticationBeforeRequest + +const btoa = require('btoa-lite') + +const withAuthorizationPrefix = require('./with-authorization-prefix') + +function authenticationBeforeRequest (state, options) { + if (typeof state.auth === 'string') { + options.headers['authorization'] = withAuthorizationPrefix(state.auth) + + // https://developer.github.com/v3/previews/#integrations + if (/^bearer /i.test(state.auth) && !/machine-man/.test(options.headers['accept'])) { + const acceptHeaders = options.headers['accept'].split(',') + .concat('application/vnd.github.machine-man-preview+json') + options.headers['accept'] = acceptHeaders.filter(Boolean).join(',') + } + + 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) + }) +} diff --git a/node_modules/@octokit/rest/plugins/authentication/index.js b/node_modules/@octokit/rest/plugins/authentication/index.js new file mode 100644 index 000000000..ea9056afd --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/index.js @@ -0,0 +1,21 @@ +module.exports = authenticationPlugin + +const beforeRequest = require('./before-request') +const requestError = require('./request-error') +const validate = require('./validate') + +function authenticationPlugin (octokit, options) { + if (!options.auth) { + return + } + + 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)) +} diff --git a/node_modules/@octokit/rest/plugins/authentication/request-error.js b/node_modules/@octokit/rest/plugins/authentication/request-error.js new file mode 100644 index 000000000..6b1a0cf79 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/request-error.js @@ -0,0 +1,47 @@ +module.exports = authenticationRequestError + +const { RequestError } = require('@octokit/request-error') + +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 + }) + }) +} diff --git a/node_modules/@octokit/rest/plugins/authentication/validate.js b/node_modules/@octokit/rest/plugins/authentication/validate.js new file mode 100644 index 000000000..1f0c00085 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/validate.js @@ -0,0 +1,21 @@ +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)}`) +} diff --git a/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js new file mode 100644 index 000000000..7750de940 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js @@ -0,0 +1,23 @@ +module.exports = withAuthorizationPrefix + +const atob = require('atob-lite') + +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}` +} diff --git a/node_modules/@octokit/rest/plugins/log/index.js b/node_modules/@octokit/rest/plugins/log/index.js new file mode 100644 index 000000000..721bf5f32 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/log/index.js @@ -0,0 +1,22 @@ +module.exports = octokitDebug + +function octokitDebug (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 + }) + }) +} diff --git a/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js b/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js new file mode 100644 index 000000000..11105197f --- /dev/null +++ b/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js @@ -0,0 +1,53 @@ +module.exports = octokitRestNormalizeGitReferenceResponses + +const { RequestError } = require('@octokit/request-error') + +function octokitRestNormalizeGitReferenceResponses (octokit) { + octokit.hook.wrap('request', (request, options) => { + const isGetOrListRefRequest = /\/repos\/:?\w+\/:?\w+\/git\/refs\/:?\w+/.test(options.url) + + if (!isGetOrListRefRequest) { + return request(options) + } + + const isGetRefRequest = 'ref' in options + + return request(options) + .then(response => { + // request single reference + if (isGetRefRequest) { + if (Array.isArray(response.data)) { + throw new RequestError(`More than one reference found for "${options.ref}"`, 404, { + request: options + }) + } + + // ✅ received single reference + return response + } + + // request list of references + if (!Array.isArray(response.data)) { + response.data = [response.data] + } + + return response + }) + + .catch(error => { + if (isGetRefRequest) { + throw error + } + + if (error.status === 404) { + return { + status: 200, + headers: error.headers, + data: [] + } + } + + throw error + }) + }) +} diff --git a/node_modules/@octokit/rest/plugins/pagination/index.js b/node_modules/@octokit/rest/plugins/pagination/index.js new file mode 100644 index 000000000..4aa4d0b6d --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/index.js @@ -0,0 +1,9 @@ +module.exports = paginatePlugin + +const iterator = require('./iterator') +const paginate = require('./paginate') + +function paginatePlugin (octokit) { + octokit.paginate = paginate.bind(null, octokit) + octokit.paginate.iterator = iterator.bind(null, octokit) +} diff --git a/node_modules/@octokit/rest/plugins/pagination/iterator.js b/node_modules/@octokit/rest/plugins/pagination/iterator.js new file mode 100644 index 000000000..9c0d56f3e --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/iterator.js @@ -0,0 +1,31 @@ +module.exports = iterator + +const normalizePaginatedListResponse = require('./normalize-paginated-list-response') + +function iterator (octokit, options) { + const headers = options.headers + let url = octokit.request.endpoint(options).url + + return { + [Symbol.asyncIterator]: () => ({ + next () { + if (!url) { + return Promise.resolve({ done: true }) + } + + return octokit.request({ 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 } + }) + } + }) + } +} diff --git a/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js new file mode 100644 index 000000000..36f61b76f --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js @@ -0,0 +1,91 @@ +/** + * 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. + */ + +module.exports = normalizePaginatedListResponse + +const { Deprecation } = require('deprecation') +const once = require('once') + +const deprecateIncompleteResults = once((log, deprecation) => log.warn(deprecation)) +const deprecateTotalCount = once((log, deprecation) => log.warn(deprecation)) +const deprecateNamespace = once((log, deprecation) => log.warn(deprecation)) + +const REGEX_IS_SEARCH_PATH = /^\/search\// +const REGEX_IS_CHECKS_PATH = /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)/ +const REGEX_IS_INSTALLATION_REPOSITORIES_PATH = /^\/installation\/repositories/ +const REGEX_IS_USER_INSTALLATIONS_PATH = /^\/user\/installations/ + +function normalizePaginatedListResponse (octokit, url, response) { + const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, '') + if ( + !REGEX_IS_SEARCH_PATH.test(path) && + !REGEX_IS_CHECKS_PATH.test(path) && + !REGEX_IS_INSTALLATION_REPOSITORIES_PATH.test(path) && + !REGEX_IS_USER_INSTALLATIONS_PATH.test(path) + ) { + return + } + + // keep the additional properties intact to avoid a breaking change, + // but log a deprecation warning when accessed + 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] + + response.data = response.data[namespaceKey] + + Object.defineProperty(response.data, namespaceKey, { + get () { + deprecateNamespace(octokit.log, new Deprecation(`[@octokit/rest] "result.data.${namespaceKey}" is deprecated. Use "result.data" instead`)) + return response.data + } + }) + + if (typeof incompleteResults !== 'undefined') { + Object.defineProperty(response.data, 'incomplete_results', { + get () { + deprecateIncompleteResults(octokit.log, new Deprecation('[@octokit/rest] "result.data.incomplete_results" is deprecated.')) + return incompleteResults + } + }) + } + + if (typeof repositorySelection !== 'undefined') { + Object.defineProperty(response.data, 'repository_selection', { + get () { + deprecateTotalCount(octokit.log, new Deprecation('[@octokit/rest] "result.data.repository_selection" is deprecated.')) + return repositorySelection + } + }) + } + + Object.defineProperty(response.data, 'total_count', { + get () { + deprecateTotalCount(octokit.log, new Deprecation('[@octokit/rest] "result.data.total_count" is deprecated.')) + return totalCount + } + }) +} diff --git a/node_modules/@octokit/rest/plugins/pagination/paginate.js b/node_modules/@octokit/rest/plugins/pagination/paginate.js new file mode 100644 index 000000000..044cb4a0d --- /dev/null +++ b/node_modules/@octokit/rest/plugins/pagination/paginate.js @@ -0,0 +1,34 @@ +module.exports = paginate + +const iterator = require('./iterator') + +function paginate (octokit, route, options, mapFn) { + if (typeof options === 'function') { + mapFn = options + options = undefined + } + options = octokit.request.endpoint.merge(route, options) + return gather(octokit, [], iterator(octokit, options)[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) + }) +} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/index.js b/node_modules/@octokit/rest/plugins/register-endpoints/index.js new file mode 100644 index 000000000..728fb46e4 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/index.js @@ -0,0 +1,7 @@ +module.exports = octokitRegisterEndpoints + +const registerEndpoints = require('./register-endpoints') + +function octokitRegisterEndpoints (octokit) { + octokit.registerEndpoints = registerEndpoints.bind(null, octokit) +} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js new file mode 100644 index 000000000..9af74b52e --- /dev/null +++ b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js @@ -0,0 +1,87 @@ +module.exports = registerEndpoints + +const { Deprecation } = require('deprecation') + +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] = function deprecatedEndpointMethod () { + octokit.log.warn(new Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`)) + octokit[namespaceName][apiName] = request + return request.apply(null, arguments) + } + + 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(`[@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 +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js new file mode 100644 index 000000000..529ae19b2 --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js @@ -0,0 +1,13 @@ +module.exports = octokitRestApiEndpoints + +const ROUTES = require('./routes.json') + +function octokitRestApiEndpoints (octokit) { + // Aliasing scopes for backward compatibility + // See https://github.com/octokit/rest.js/pull/1134 + ROUTES.gitdata = ROUTES.git + ROUTES.authorization = ROUTES.oauthAuthorizations + ROUTES.pullRequests = ROUTES.pulls + + octokit.registerEndpoints(ROUTES) +} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json new file mode 100644 index 000000000..377a7b30a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json @@ -0,0 +1,11284 @@ +{ + "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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "url": "/marketplace_listing/accounts/:account_id" + }, + "checkAccountIsAssociatedWithAnyStubbed": { + "method": "GET", + "params": { + "account_id": { + "required": true, + "type": "integer" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "url": "/marketplace_listing/stubbed/accounts/:account_id" + }, + "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" + }, + "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" + }, + "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" + } + }, + "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": { + "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/refs/: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" + }, + "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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "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": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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" + }, + "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": { + "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": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "GET", + "params": { + "owner": { + "required": true, + "type": "string" + }, + "repo": { + "required": true, + "type": "string" + }, + "since": { + "type": "string" + } + }, + "url": "/repos/:owner/:repo/import/authors" + }, + "getImportProgress": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "method": "GET", + "params": { + "owner": { + "required": true, + "type": "string" + }, + "repo": { + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/import" + }, + "getLargeFiles": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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" + }, + "mapCommitAuthor": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.barred-rock-preview+json" + }, + "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": { + "method": "GET", + "params": { + "access_token": { + "required": true, + "type": "string" + }, + "client_id": { + "required": true, + "type": "string" + } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "createAuthorization": { + "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": { + "method": "DELETE", + "params": { + "authorization_id": { + "required": true, + "type": "integer" + } + }, + "url": "/authorizations/:authorization_id" + }, + "deleteGrant": { + "method": "DELETE", + "params": { + "grant_id": { + "required": true, + "type": "integer" + } + }, + "url": "/applications/grants/:grant_id" + }, + "getAuthorization": { + "method": "GET", + "params": { + "authorization_id": { + "required": true, + "type": "integer" + } + }, + "url": "/authorizations/:authorization_id" + }, + "getGrant": { + "method": "GET", + "params": { + "grant_id": { + "required": true, + "type": "integer" + } + }, + "url": "/applications/grants/:grant_id" + }, + "getOrCreateAuthorizationForApp": { + "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": { + "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": { + "method": "GET", + "params": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "url": "/authorizations" + }, + "listGrants": { + "method": "GET", + "params": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "url": "/applications/grants" + }, + "resetAuthorization": { + "method": "POST", + "params": { + "access_token": { + "required": true, + "type": "string" + }, + "client_id": { + "required": true, + "type": "string" + } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeAuthorizationForApplication": { + "method": "DELETE", + "params": { + "access_token": { + "required": true, + "type": "string" + }, + "client_id": { + "required": true, + "type": "string" + } + }, + "url": "/applications/:client_id/tokens/:access_token" + }, + "revokeGrantForApplication": { + "method": "DELETE", + "params": { + "access_token": { + "required": true, + "type": "string" + }, + "client_id": { + "required": true, + "type": "string" + } + }, + "url": "/applications/:client_id/grants/:access_token" + }, + "updateAuthorization": { + "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": "string" + } + }, + "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" + }, + "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_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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + } + }, + "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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "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": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "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" + }, + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "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" + }, + "number": { + "alias": "pull_number", + "deprecated": true, + "type": "integer" + }, + "owner": { + "required": true, + "type": "string" + }, + "path": { + "required": true, + "type": "string" + }, + "position": { + "required": true, + "type": "integer" + }, + "pull_number": { + "required": true, + "type": "integer" + }, + "repo": { + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/pulls/:pull_number/comments" + }, + "createCommentReply": { + "method": "POST", + "params": { + "body": { + "required": true, + "type": "string" + }, + "in_reply_to": { + "required": true, + "type": "integer" + }, + "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/comments" + }, + "createFromIssue": { + "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" + }, + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,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" + }, + "delete": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json,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" + } + }, + "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" + }, + "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" + }, + "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" + }, + "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" + } + }, + "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" + }, + "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" + } + }, + "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" + }, + "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": "commit_sha", + "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": "\"Get the SHA-1 of a commit reference\" will be removed. Use \"Get a single commit\" instead with media type format set to \"sha\" instead.", + "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" + }, + "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" + }, + "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" + }, + "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" + ], + "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": { + "method": "GET", + "params": { + "branch": { + "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/branches/:branch/protection/restrictions/teams" + }, + "listProtectedBranchUserRestrictions": { + "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": "string" + } + }, + "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" + }, + "listTopics": { + "method": "GET", + "params": { + "owner": { + "required": true, + "type": "string" + }, + "repo": { + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/topics" + }, + "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" + }, + "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" + }, + "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": { + "method": "PUT", + "params": { + "names": { + "required": true, + "type": "string[]" + }, + "owner": { + "required": true, + "type": "string" + }, + "repo": { + "required": true, + "type": "string" + } + }, + "url": "/repos/:owner/:repo/topics" + }, + "requestPageBuild": { + "headers": { + "accept": "application/vnd.github.mister-fantastic-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.nightshade-preview+json" + }, + "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" + }, + "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" + } + }, + "url": "/repos/:owner/:repo" + }, + "updateBranchProtection": { + "method": "PUT", + "params": { + "branch": { + "required": true, + "type": "string" + }, + "enforce_admins": { + "allowNull": true, + "required": true, + "type": "boolean" + }, + "owner": { + "required": true, + "type": "string" + }, + "repo": { + "required": true, + "type": "string" + }, + "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.teams": { + "type": "string[]" + }, + "restrictions.users": { + "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": { + "file": { + "mapTo": "data", + "required": 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": { + "method": "PUT", + "params": { + "team_id": { + "required": true, + "type": "integer" + }, + "username": { + "required": true, + "type": "string" + } + }, + "url": "/teams/:team_id/members/:username" + }, + "addOrUpdateMembership": { + "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": { + "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": { + "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": { + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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" + }, + "delete": { + "method": "DELETE", + "params": { + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id" + }, + "deleteDiscussion": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "method": "DELETE", + "params": { + "discussion_number": { + "required": true, + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "deleteDiscussionComment": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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" + }, + "get": { + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "method": "GET", + "params": { + "discussion_number": { + "required": true, + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/discussions/:discussion_number" + }, + "getDiscussionComment": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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" + }, + "getMember": { + "method": "GET", + "params": { + "team_id": { + "required": true, + "type": "integer" + }, + "username": { + "required": true, + "type": "string" + } + }, + "url": "/teams/:team_id/members/:username" + }, + "getMembership": { + "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": { + "headers": { + "accept": "application/vnd.github.hellcat-preview+json" + }, + "method": "GET", + "params": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/teams" + }, + "listDiscussionComments": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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": { + "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": { + "method": "GET", + "params": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/invitations" + }, + "listProjects": { + "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": { + "method": "GET", + "params": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/repos" + }, + "removeMember": { + "method": "DELETE", + "params": { + "team_id": { + "required": true, + "type": "integer" + }, + "username": { + "required": true, + "type": "string" + } + }, + "url": "/teams/:team_id/members/:username" + }, + "removeMembership": { + "method": "DELETE", + "params": { + "team_id": { + "required": true, + "type": "integer" + }, + "username": { + "required": true, + "type": "string" + } + }, + "url": "/teams/:team_id/memberships/:username" + }, + "removeProject": { + "method": "DELETE", + "params": { + "project_id": { + "required": true, + "type": "integer" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id/projects/:project_id" + }, + "removeRepo": { + "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": { + "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": { + "method": "PATCH", + "params": { + "description": { + "type": "string" + }, + "name": { + "required": true, + "type": "string" + }, + "parent_team_id": { + "type": "integer" + }, + "permission": { + "enum": [ + "pull", + "push", + "admin" + ], + "type": "string" + }, + "privacy": { + "type": "string" + }, + "team_id": { + "required": true, + "type": "integer" + } + }, + "url": "/teams/:team_id" + }, + "updateDiscussion": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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": { + "headers": { + "accept": "application/vnd.github.echo-preview+json" + }, + "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" + } + }, + "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": { + "headers": { + "accept": "application/vnd.github.hagar-preview+json" + }, + "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" + } + } +} diff --git a/node_modules/@octokit/rest/plugins/validate/index.js b/node_modules/@octokit/rest/plugins/validate/index.js new file mode 100644 index 000000000..71caab39a --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/index.js @@ -0,0 +1,7 @@ +module.exports = octokitValidate + +const validate = require('./validate') + +function octokitValidate (octokit) { + octokit.hook.before('request', validate.bind(null, octokit)) +} diff --git a/node_modules/@octokit/rest/plugins/validate/validate.js b/node_modules/@octokit/rest/plugins/validate/validate.js new file mode 100644 index 000000000..fac99084d --- /dev/null +++ b/node_modules/@octokit/rest/plugins/validate/validate.js @@ -0,0 +1,113 @@ +'use strict' + +module.exports = validate + +const { RequestError } = require('@octokit/request-error') +const get = require('lodash.get') +const set = require('lodash.set') + +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(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 +} diff --git a/node_modules/atob-lite/.npmignore b/node_modules/atob-lite/.npmignore new file mode 100644 index 000000000..50c74582d --- /dev/null +++ b/node_modules/atob-lite/.npmignore @@ -0,0 +1,6 @@ +node_modules +*.log +.DS_Store +bundle.js +test +test.js diff --git a/node_modules/atob-lite/LICENSE.md b/node_modules/atob-lite/LICENSE.md new file mode 100644 index 000000000..ee27ba4b4 --- /dev/null +++ b/node_modules/atob-lite/LICENSE.md @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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/node_modules/atob-lite/README.md b/node_modules/atob-lite/README.md new file mode 100644 index 000000000..99ea05d57 --- /dev/null +++ b/node_modules/atob-lite/README.md @@ -0,0 +1,37 @@ +# atob-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/atob-lite.svg?style=flat) +![](http://img.shields.io/npm/l/atob-lite.svg?style=flat) + +Smallest/simplest possible means of using atob with both Node and browserify. + +In the browser, decoding base64 strings is done using: + +``` javascript +var decoded = atob(encoded) +``` + +However in Node, it's done like so: + +``` javascript +var decoded = new Buffer(encoded, 'base64').toString('utf8') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/atob-lite.png)](https://nodei.co/npm/atob-lite/) + +### `decoded = atob(encoded)` + +Returns the decoded value of a base64-encoded string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/atob-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/atob-lite/atob-browser.js b/node_modules/atob-lite/atob-browser.js new file mode 100644 index 000000000..cee1a38cb --- /dev/null +++ b/node_modules/atob-lite/atob-browser.js @@ -0,0 +1,3 @@ +module.exports = function _atob(str) { + return atob(str) +} diff --git a/node_modules/atob-lite/atob-node.js b/node_modules/atob-lite/atob-node.js new file mode 100644 index 000000000..707207569 --- /dev/null +++ b/node_modules/atob-lite/atob-node.js @@ -0,0 +1,3 @@ +module.exports = function atob(str) { + return Buffer.from(str, 'base64').toString('binary') +} diff --git a/node_modules/atob-lite/package.json b/node_modules/atob-lite/package.json new file mode 100644 index 000000000..88a1f1d0b --- /dev/null +++ b/node_modules/atob-lite/package.json @@ -0,0 +1,67 @@ +{ + "_from": "atob-lite@^2.0.0", + "_id": "atob-lite@2.0.0", + "_inBundle": false, + "_integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "_location": "/atob-lite", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "atob-lite@^2.0.0", + "name": "atob-lite", + "escapedName": "atob-lite", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "_shasum": "0fef5ad46f1bd7a8502c65727f0367d5ee43d696", + "_spec": "atob-lite@^2.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "atob-browser.js", + "bugs": { + "url": "https://github.com/hughsk/atob-lite/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Smallest/simplest possible means of using atob with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-closer": "^1.0.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/atob-lite", + "keywords": [ + "atob", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "atob-node.js", + "name": "atob-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/atob-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "2.0.0" +} diff --git a/node_modules/before-after-hook/LICENSE b/node_modules/before-after-hook/LICENSE new file mode 100644 index 000000000..225063c34 --- /dev/null +++ b/node_modules/before-after-hook/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Gregor Martynus and other contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/before-after-hook/README.md b/node_modules/before-after-hook/README.md new file mode 100644 index 000000000..68c927d9c --- /dev/null +++ b/node_modules/before-after-hook/README.md @@ -0,0 +1,574 @@ +# before-after-hook + +> asynchronous hooks for internal functionality + +[![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) +[![Build Status](https://travis-ci.org/gr2m/before-after-hook.svg?branch=master)](https://travis-ci.org/gr2m/before-after-hook) +[![Coverage Status](https://coveralls.io/repos/gr2m/before-after-hook/badge.svg?branch=master)](https://coveralls.io/r/gr2m/before-after-hook?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/before-after-hook.svg)](https://greenkeeper.io/) + +## Usage + +### Singular hook + +Recommended for [TypeScript](#typescript) + +```js +// instantiate singular hook API +const hook = new Hook.Singular() + +// Create a hook +function getData (options) { + return hook(fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError) +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hook.before(beforeHook) +hook.error(errorHook) +hook.after(afterHook) + +getData({id: 123}) +``` + +### Hook collection +```js +// instantiate hook collection API +const hookCollection = new Hook.Collection() + +// Create a hook +function getData (options) { + return hookCollection('get', fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError) +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hookCollection.before('get', beforeHook) +hookCollection.error('get', errorHook) +hookCollection.after('get', afterHook) + +getData({id: 123}) +``` + +### Hook.Singular vs Hook.Collection + +There's no fundamental difference between the `Hook.Singular` and `Hook.Collection` hooks except for the fact that a hook from a collection requires you to pass along the name. Therefore the following explanation applies to both code snippets as described above. + +The methods are executed in the following order + +1. `beforeHook` +2. `fetchFromDatabase` +3. `afterHook` +4. `getData` + +`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`. + +If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is +called next. + +If `afterHook` throws an error then `handleGetError` is called instead +of `getData`. + +If `errorHook` throws an error then `handleGetError` is called next, otherwise +`afterHook` and `getData`. + +You can also use `hook.wrap` to achieve the same thing as shown above (collection example): + +```js +hookCollection.wrap('get', async (getData, options) => { + await beforeHook(options) + + try { + const result = getData(options) + } catch (error) { + await errorHook(error, options) + } + + await afterHook(result, options) +}) +``` + +## Install + +``` +npm install before-after-hook +``` + +Or download [the latest `before-after-hook.min.js`](https://github.com/gr2m/before-after-hook/releases/latest). + +## API + +- [Singular Hook Constructor](#singular-hook-api) +- [Hook Collection Constructor](#hook-collection-api) + +## Singular hook API + +- [Singular constructor](#singular-constructor) +- [hook.api](#singular-api) +- [hook()](#singular-api) +- [hook.before()](#singular-api) +- [hook.error()](#singular-api) +- [hook.after()](#singular-api) +- [hook.wrap()](#singular-api) +- [hook.remove()](#singular-api) + +### Singular constructor + +The `Hook.Singular` constructor has no options and returns a `hook` instance with the +methods below: + +```js +const hook = new Hook.Singular() +``` +Using the singular hook is recommended for [TypeScript](#typescript) + +### Singular API + +The singular hook is a reference to a single hook. This means that there's no need to pass along any identifier (such as a `name` as can be seen in the [Hook.Collection API](#hookcollectionapi)). + +The API of a singular hook is exactly the same as a collection hook and we therefore suggest you read the [Hook.Collection API](#hookcollectionapi) and leave out any use of the `name` argument. Just skip it like described in this example: +```js +const hook = new Hook.Singular() + +// good +hook.before(beforeHook) +hook.after(afterHook) +hook(fetchFromDatabase, options) + +// bad +hook.before('get', beforeHook) +hook.after('get', afterHook) +hook('get', fetchFromDatabase, options) +``` + +## Hook collection API + +- [Collection constructor](#collection-constructor) +- [collection.api](#collectionapi) +- [collection()](#collection) +- [collection.before()](#collectionbefore) +- [collection.error()](#collectionerror) +- [collection.after()](#collectionafter) +- [collection.wrap()](#collectionwrap) +- [collection.remove()](#collectionremove) + +### Collection constructor + +The `Hook.Collection` constructor has no options and returns a `hookCollection` instance with the +methods below + +```js +const hookCollection = new Hook.Collection() +``` + +### hookCollection.api + +Use the `api` property to return the public API: + +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +That way you don’t need to expose the [hookCollection()](#hookcollection) method to consumers of your library + +### hookCollection() + +Invoke before and after hooks. Returns a promise. + +```js +hookCollection(nameOrNames, method /*, options */) +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameString or Array of StringsHook name, for example 'save'. Or an array of names, see example below.Yes
methodFunctionCallback to be executed after all before hooks finished execution successfully. options is passed as first argumentYes
optionsObjectWill be passed to all before hooks as reference, so they can mutate itNo, defaults to empty object ({})
+ +Resolves with whatever `method` returns or resolves with. +Rejects with error that is thrown or rejected with by + +1. Any of the before hooks, whichever rejects / throws first +2. `method` +3. Any of the after hooks, whichever rejects / throws first + +Simple Example + +```js +hookCollection('save', function (record) { + return store.save(record) +}, record) +// shorter: hookCollection('save', store.save, record) + +hookCollection.before('save', function addTimestamps (record) { + const now = new Date().toISOString() + if (record.createdAt) { + record.updatedAt = now + } else { + record.createdAt = now + } +}) +``` + +Example defining multiple hooks at once. + +```js +hookCollection(['add', 'save'], function (record) { + return store.save(record) +}, record) + +hookCollection.before('add', function addTimestamps (record) { + if (!record.type) { + throw new Error('type property is required') + } +}) + +hookCollection.before('save', function addTimestamps (record) { + if (!record.type) { + throw new Error('type property is required') + } +}) +``` + +Defining multiple hooks is helpful if you have similar methods for which you want to define separate hooks, but also an additional hook that gets called for all at once. The example above is equal to this: + +```js +hookCollection('add', function (record) { + return hookCollection('save', function (record) { + return store.save(record) + }, record) +}, record) +``` + +### hookCollection.before() + +Add before hook for given name. + +```js +hookCollection.before(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed before the wrapped method. Called with the hook’s + options argument. Before hooks can mutate the passed options + before they are passed to the wrapped method. + Yes
+ +Example + +```js +hookCollection.before('save', function validate (record) { + if (!record.name) { + throw new Error('name property is required') + } +}) +``` + +### hookCollection.error() + +Add error hook for given name. + +```js +hookCollection.error(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed when an error occurred in either the wrapped method or a + before hook. Called with the thrown error + and the hook’s options argument. The first method + which does not throw an error will set the result that the after hook + methods will receive. + Yes
+ +Example + +```js +hookCollection.error('save', function (error, options) { + if (error.ignore) return + throw error +}) +``` + +### hookCollection.after() + +Add after hook for given name. + +```js +hookCollection.after(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed after wrapped method. Called with what the wrapped method + resolves with the hook’s options argument. + Yes
+ +Example + +```js +hookCollection.after('save', function (result, options) { + if (result.updatedAt) { + app.emit('update', result) + } else { + app.emit('create', result) + } +}) +``` + +### hookCollection.wrap() + +Add wrap hook for given name. + +```js +hookCollection.wrap(name, method) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Receives both the wrapped method and the passed options as arguments so it can add logic before and after the wrapped method, it can handle errors and even replace the wrapped method altogether + Yes
+ +Example + +```js +hookCollection.wrap('save', async function (saveInDatabase, options) { + if (!record.name) { + throw new Error('name property is required') + } + + try { + const result = await saveInDatabase(options) + + if (result.updatedAt) { + app.emit('update', result) + } else { + app.emit('create', result) + } + + return result + } catch (error) { + if (error.ignore) return + throw error + } +}) +``` + +See also: [Test mock example](examples/test-mock-example.md) + +### hookCollection.remove() + +Removes hook for given name. + +```js +hookCollection.remove(name, hookMethod) +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
beforeHookMethodFunction + Same function that was previously passed to hookCollection.before(), hookCollection.error(), hookCollection.after() or hookCollection.wrap() + Yes
+ +Example + +```js +hookCollection.remove('save', validateRecord) +``` + +## TypeScript + +This library contains type definitions for TypeScript. When you use TypeScript we highly recommend using the `Hook.Singular` constructor for your hooks as this allows you to pass along type information for the options object. For example: + +```ts + +import {Hook} from 'before-after-hook' + +interface Foo { + bar: string + num: number; +} + +const hook = new Hook.Singular(); + +hook.before(function (foo) { + + // typescript will complain about the following mutation attempts + foo.hello = 'world' + foo.bar = 123 + + // yet this is valid + foo.bar = 'other-string' + foo.num = 123 +}) + +const foo = hook(function(foo) { + // handle `foo` + foo.bar = 'another-string' +}, {bar: 'random-string'}) + +// foo outputs +{ + bar: 'another-string', + num: 123 +} +``` + +An alternative import: + +```ts +import {Singular, Collection} from 'before-after-hook' + +const hook = new Singular<{foo: string}>(); +const hookCollection = new Collection(); +``` + +## Upgrading to 1.4 + +Since version 1.4 the `Hook` constructor has been deprecated in favor of returning `Hook.Singular` in an upcoming breaking release. + +Version 1.4 is still 100% backwards-compatible, but if you want to continue using hook collections, we recommend using the `Hook.Collection` constructor instead before the next release. + +For even more details, check out [the PR](https://github.com/gr2m/before-after-hook/pull/52). + +## See also + +If `before-after-hook` is not for you, have a look at one of these alternatives: + +- https://github.com/keystonejs/grappling-hook +- https://github.com/sebelga/promised-hooks +- https://github.com/bnoguchi/hooks-js +- https://github.com/cb1kenobi/hook-emitter + +## License + +[Apache 2.0](LICENSE) diff --git a/node_modules/before-after-hook/index.d.ts b/node_modules/before-after-hook/index.d.ts new file mode 100644 index 000000000..3c19a5c9a --- /dev/null +++ b/node_modules/before-after-hook/index.d.ts @@ -0,0 +1,96 @@ +type HookMethod = (options: O) => R | Promise + +type BeforeHook = (options: O) => void +type ErrorHook = (error: E, options: O) => void +type AfterHook = (result: R, options: O) => void +type WrapHook = ( + hookMethod: HookMethod, + options: O +) => R | Promise + +type AnyHook = + | BeforeHook + | ErrorHook + | AfterHook + | WrapHook + +export interface HookCollection { + /** + * Invoke before and after hooks + */ + ( + name: string | string[], + hookMethod: HookMethod, + options?: any + ): Promise + /** + * Add `before` hook for given `name` + */ + before(name: string, beforeHook: BeforeHook): void + /** + * Add `error` hook for given `name` + */ + error(name: string, errorHook: ErrorHook): void + /** + * Add `after` hook for given `name` + */ + after(name: string, afterHook: AfterHook): void + /** + * Add `wrap` hook for given `name` + */ + wrap(name: string, wrapHook: WrapHook): void + /** + * Remove added hook for given `name` + */ + remove(name: string, hook: AnyHook): void +} + +export interface HookSingular { + /** + * Invoke before and after hooks + */ + (hookMethod: HookMethod, options?: O): Promise + /** + * Add `before` hook + */ + before(beforeHook: BeforeHook): void + /** + * Add `error` hook + */ + error(errorHook: ErrorHook): void + /** + * Add `after` hook + */ + after(afterHook: AfterHook): void + /** + * Add `wrap` hook + */ + wrap(wrapHook: WrapHook): void + /** + * Remove added hook + */ + remove(hook: AnyHook): void +} + +type Collection = new () => HookCollection +type Singular = new () => HookSingular + +interface Hook { + new (): HookCollection + + /** + * Creates a collection of hooks + */ + Collection: Collection + + /** + * Creates a nameless hook that supports strict typings + */ + Singular: Singular +} + +export const Hook: Hook +export const Collection: Collection +export const Singular: Singular + +export default Hook diff --git a/node_modules/before-after-hook/index.js b/node_modules/before-after-hook/index.js new file mode 100644 index 000000000..a97d89b77 --- /dev/null +++ b/node_modules/before-after-hook/index.js @@ -0,0 +1,57 @@ +var register = require('./lib/register') +var addHook = require('./lib/add') +var removeHook = require('./lib/remove') + +// 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 diff --git a/node_modules/before-after-hook/lib/add.js b/node_modules/before-after-hook/lib/add.js new file mode 100644 index 000000000..a34e3f469 --- /dev/null +++ b/node_modules/before-after-hook/lib/add.js @@ -0,0 +1,46 @@ +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 + }) +} diff --git a/node_modules/before-after-hook/lib/register.js b/node_modules/before-after-hook/lib/register.js new file mode 100644 index 000000000..b3d01fdc9 --- /dev/null +++ b/node_modules/before-after-hook/lib/register.js @@ -0,0 +1,28 @@ +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)() + }) +} diff --git a/node_modules/before-after-hook/lib/remove.js b/node_modules/before-after-hook/lib/remove.js new file mode 100644 index 000000000..e357c514b --- /dev/null +++ b/node_modules/before-after-hook/lib/remove.js @@ -0,0 +1,17 @@ +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) +} diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json new file mode 100644 index 000000000..cb191ead2 --- /dev/null +++ b/node_modules/before-after-hook/package.json @@ -0,0 +1,97 @@ +{ + "_from": "before-after-hook@^2.0.0", + "_id": "before-after-hook@2.1.0", + "_inBundle": false, + "_integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "_location": "/before-after-hook", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "before-after-hook@^2.0.0", + "name": "before-after-hook", + "escapedName": "before-after-hook", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "_shasum": "b6c03487f44e24200dd30ca5e6a1979c5d2fb635", + "_spec": "before-after-hook@^2.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "Gregor Martynus" + }, + "bugs": { + "url": "https://github.com/gr2m/before-after-hook/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "asynchronous before/error/after hooks for internal functionality", + "devDependencies": { + "browserify": "^16.0.0", + "gaze-cli": "^0.2.0", + "istanbul": "^0.4.0", + "istanbul-coveralls": "^1.0.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.4.4", + "semantic-release": "^15.0.0", + "simple-mock": "^0.8.0", + "standard": "^13.0.1", + "tap-min": "^2.0.0", + "tap-spec": "^5.0.0", + "tape": "^4.2.2", + "typescript": "^3.5.3", + "uglify-js": "^3.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "homepage": "https://github.com/gr2m/before-after-hook#readme", + "keywords": [ + "hook", + "hooks", + "api" + ], + "license": "Apache-2.0", + "name": "before-after-hook", + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*.js" + ] + } + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/before-after-hook.git" + }, + "scripts": { + "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", + "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", + "posttest": "npm run validate:ts", + "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", + "prebuild": "rimraf dist && mkdirp dist", + "presemantic-release": "npm run build", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "npm run -s test:node | tap-spec", + "test:coverage": "istanbul cover test", + "test:coverage:upload": "istanbul-coveralls", + "test:node": "node test", + "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", + "validate:ts": "tsc --strict --target es6 index.d.ts" + }, + "types": "./index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/btoa-lite/.npmignore b/node_modules/btoa-lite/.npmignore new file mode 100644 index 000000000..50c74582d --- /dev/null +++ b/node_modules/btoa-lite/.npmignore @@ -0,0 +1,6 @@ +node_modules +*.log +.DS_Store +bundle.js +test +test.js diff --git a/node_modules/btoa-lite/LICENSE.md b/node_modules/btoa-lite/LICENSE.md new file mode 100644 index 000000000..ee27ba4b4 --- /dev/null +++ b/node_modules/btoa-lite/LICENSE.md @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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/node_modules/btoa-lite/README.md b/node_modules/btoa-lite/README.md new file mode 100644 index 000000000..e36492e9b --- /dev/null +++ b/node_modules/btoa-lite/README.md @@ -0,0 +1,37 @@ +# btoa-lite +![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) +![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat) +![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat) + +Smallest/simplest possible means of using btoa with both Node and browserify. + +In the browser, encoding base64 strings is done using: + +``` javascript +var encoded = btoa(decoded) +``` + +However in Node, it's done like so: + +``` javascript +var encoded = new Buffer(decoded).toString('base64') +``` + +You can easily check if `Buffer` exists and switch between the approaches +accordingly, but using `Buffer` anywhere in your browser source will pull +in browserify's `Buffer` shim which is pretty hefty. This package uses +the `main` and `browser` fields in its `package.json` to perform this +check at build time and avoid pulling `Buffer` in unnecessarily. + +## Usage + +[![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/) + +### `encoded = btoa(decoded)` + +Returns the base64-encoded value of a string. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/btoa-lite/btoa-browser.js b/node_modules/btoa-lite/btoa-browser.js new file mode 100644 index 000000000..1b3acdbe2 --- /dev/null +++ b/node_modules/btoa-lite/btoa-browser.js @@ -0,0 +1,3 @@ +module.exports = function _btoa(str) { + return btoa(str) +} diff --git a/node_modules/btoa-lite/btoa-node.js b/node_modules/btoa-lite/btoa-node.js new file mode 100644 index 000000000..0278470bb --- /dev/null +++ b/node_modules/btoa-lite/btoa-node.js @@ -0,0 +1,3 @@ +module.exports = function btoa(str) { + return new Buffer(str).toString('base64') +} diff --git a/node_modules/btoa-lite/package.json b/node_modules/btoa-lite/package.json new file mode 100644 index 000000000..a5e4c3bb4 --- /dev/null +++ b/node_modules/btoa-lite/package.json @@ -0,0 +1,66 @@ +{ + "_from": "btoa-lite@^1.0.0", + "_id": "btoa-lite@1.0.0", + "_inBundle": false, + "_integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "_location": "/btoa-lite", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "btoa-lite@^1.0.0", + "name": "btoa-lite", + "escapedName": "btoa-lite", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "_shasum": "337766da15801210fdd956c22e9c6891ab9d0337", + "_spec": "btoa-lite@^1.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "btoa-browser.js", + "bugs": { + "url": "https://github.com/hughsk/btoa-lite/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Smallest/simplest possible means of using btoa with both Node and browserify", + "devDependencies": { + "browserify": "^10.2.4", + "smokestack": "^3.3.0", + "tap-spec": "^4.0.0", + "tape": "^4.0.0" + }, + "homepage": "https://github.com/hughsk/btoa-lite", + "keywords": [ + "btoa", + "base64", + "isomorphic", + "browser", + "node", + "shared" + ], + "license": "MIT", + "main": "btoa-node.js", + "name": "btoa-lite", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/btoa-lite.git" + }, + "scripts": { + "test": "npm run test-node && npm run test-browser", + "test-browser": "browserify test | smokestack | tap-spec", + "test-node": "node test | tap-spec" + }, + "version": "1.0.0" +} diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 000000000..ded9620b1 --- /dev/null +++ b/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) + + +### Bug Fixes + +* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) + + + + +## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) + + +### Bug Fixes + +* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) + + + + +## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) + + + + +## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) + + + + +## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) + + + + +# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) + + +### Bug Fixes + +* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) +* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Features + +* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Chores + +* upgrade tooling +* upgrate project to es6 (node v4) + + +### BREAKING CHANGES + +* remove support for older nodejs versions, only `node >= 4` is supported + + + +## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) + + + +## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS v7 + + + +# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) + + +## Features + +* add support for `options.shell` +* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module + + +## Chores + +* refactor some code to make it more clear +* update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 000000000..8407b9a30 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +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/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 000000000..e895cd7a7 --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,94 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn +[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn +[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev +[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg +[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg +[greenkeeper-url]:https://greenkeeper.io/ + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) +- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) +- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) +- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) +- No `options.shell` support on node `` where `` must not contain any arguments. +If you would like to have the shebang support improved, feel free to contribute via a pull-request. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` +`$ npm test -- --watch` during development + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 000000000..5509742ca --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 000000000..14df9b623 --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,59 @@ +'use strict'; + +const isWin = process.platform === 'win32'; + +function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: 'ENOENT', + errno: 'ENOENT', + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args, + }); +} + +function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + + const originalEmit = cp.emit; + + cp.emit = function (name, arg1) { + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + return null; +} + +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 000000000..962827a94 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,125 @@ +'use strict'; + +const path = require('path'); +const niceTry = require('nice-try'); +const resolveCommand = require('./util/resolveCommand'); +const escape = require('./util/escape'); +const readShebang = require('./util/readShebang'); +const semver = require('semver'); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 +const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; + +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + + const shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + + return resolveCommand(parsed); + } + + return parsed.file; +} + +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); + + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + // Note that `forceShell` is an hidden option used only in tests + if (parsed.options.forceShell || needsShell) { + // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` + // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument + // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, + // we need to double escape them + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) + // This is necessary otherwise it will always fail with ENOENT in those cases + parsed.command = path.normalize(parsed.command); + + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option + // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = Object.assign({}, options); // Clone object to avoid changing the original + + // Build our parsed object + const parsed = { + command, + args, + options, + file: undefined, + original: { + command, + args, + }, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js new file mode 100644 index 000000000..b0bb84c3a --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escape.js @@ -0,0 +1,45 @@ +'use strict'; + +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + return arg; +} + +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; + + // Algorithm below is based on https://qntm.org/cmd + + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = `"${arg}"`; + + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } + + return arg; +} + +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 000000000..bd4f1280c --- /dev/null +++ b/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,32 @@ +'use strict'; + +const fs = require('fs'); +const shebangCommand = require('shebang-command'); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; + + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } + + let fd; + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} + +module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 000000000..2fd5ad270 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,47 @@ +'use strict'; + +const path = require('path'); +const which = require('which'); +const pathKey = require('path-key')(); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } + + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } + + return resolved; +} + +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/node_modules/.bin/semver b/node_modules/cross-spawn/node_modules/.bin/semver new file mode 100644 index 000000000..d592e6930 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/.bin/semver @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/cross-spawn/node_modules/.bin/semver.cmd b/node_modules/cross-spawn/node_modules/.bin/semver.cmd new file mode 100644 index 000000000..37c00a46d --- /dev/null +++ b/node_modules/cross-spawn/node_modules/.bin/semver.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\semver\bin\semver" %* +) \ No newline at end of file diff --git a/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md new file mode 100644 index 000000000..66304fdd2 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/CHANGELOG.md @@ -0,0 +1,39 @@ +# changes log + +## 5.7 + +* Add `minVersion` method + +## 5.6 + +* Move boolean `loose` param to an options object, with + backwards-compatibility protection. +* Add ability to opt out of special prerelease version handling with + the `includePrerelease` option flag. + +## 5.5 + +* Add version coercion capabilities + +## 5.4 + +* Add intersection checking + +## 5.3 + +* Add `minSatisfying` method + +## 5.2 + +* Add `prerelease(v)` that returns prerelease components + +## 5.1 + +* Add Backus-Naur for ranges +* Remove excessively cute inspection methods + +## 5.0 + +* Remove AMD/Browserified build artifacts +* Fix ltr and gtr when using the `*` range +* Fix for range `*` with a prerelease identifier diff --git a/node_modules/cross-spawn/node_modules/semver/LICENSE b/node_modules/cross-spawn/node_modules/semver/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cross-spawn/node_modules/semver/README.md b/node_modules/cross-spawn/node_modules/semver/README.md new file mode 100644 index 000000000..e5ccececf --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/README.md @@ -0,0 +1,411 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Install + +```bash +npm install --save semver +```` + +## Usage + +As a node module: + +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +semver.minVersion('>=1.0.0') // '1.0.0' +semver.valid(semver.coerce('v2')) // '2.0.0' +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' +``` + +As a command-line utility: + +``` +$ semver -h + +A JavaScript implementation of the https://semver.org/ specification +Copyright Isaac Z. Schlueter + +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence + +Options: +-r --range + Print versions that match the specified range. + +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + +-l --loose + Interpret versions and ranges loosely + +-p --include-prerelease + Always include prerelease versions in range matching + +-c --coerce + Coerce a string into SemVer if possible + (does not imply --loose) + +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. + +If no satisfying versions are found, then exits failure. + +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +Note that this behavior can be suppressed (treating all prerelease +versions as if they were normal versions, for the purpose of range +matching) by setting the `includePrerelease` flag on the options +object to any +[functions](https://github.com/npm/node-semver#functions) that do +range matching. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' +``` + +command-line example: + +```bash +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```bash +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `options` object argument. All +options in this object are `false` by default. The options supported +are: + +- `loose` Be more forgiving about not-quite-valid semver strings. + (Any resulting output will always be 100% strict compliant, of + course.) For backwards compatibility reasons, if the `options` + argument is a boolean value instead of an object, it is interpreted + to be the `loose` param. +- `includePrerelease` Set to suppress the [default + behavior](https://github.com/npm/node-semver#prerelease-tags) of + excluding prerelease tagged versions from ranges unless they are + explicitly opted into. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. +* `parse(v)`: Attempt to parse a string as a semantic version, returning either + a `SemVer` object or `null`. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `minVersion(range)`: Return the lowest version that can possibly match + the given range. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. + +### Coercion + +* `coerce(version)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver +string to semver. It looks for the first digit in a string, and +consumes all remaining characters which satisfy at least a partial semver +(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). +Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). +All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). +Only text which lacks digits will fail coercion (`version one` is not valid). +The maximum length for any semver component considered for coercion is 16 characters; +longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). +The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; +higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/cross-spawn/node_modules/semver/bin/semver b/node_modules/cross-spawn/node_modules/semver/bin/semver new file mode 100644 index 000000000..801e77f13 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/bin/semver @@ -0,0 +1,160 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/node_modules/cross-spawn/node_modules/semver/package.json b/node_modules/cross-spawn/node_modules/semver/package.json new file mode 100644 index 000000000..8d0e9daf6 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/package.json @@ -0,0 +1,64 @@ +{ + "_args": [ + [ + "semver@5.7.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "semver@5.7.0", + "_id": "semver@5.7.0", + "_inBundle": false, + "_integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "_location": "/cross-spawn/semver", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "semver@5.7.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "5.7.0", + "saveSpec": null, + "fetchSpec": "5.7.0" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "_spec": "5.7.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^13.0.0-rc.18" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap" + }, + "tap": { + "check-coverage": true + }, + "version": "5.7.0" +} diff --git a/node_modules/cross-spawn/node_modules/semver/range.bnf b/node_modules/cross-spawn/node_modules/semver/range.bnf new file mode 100644 index 000000000..d4c6ae0d7 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | [1-9] ( [0-9] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/cross-spawn/node_modules/semver/semver.js b/node_modules/cross-spawn/node_modules/semver/semver.js new file mode 100644 index 000000000..d315d5d68 --- /dev/null +++ b/node_modules/cross-spawn/node_modules/semver/semver.js @@ -0,0 +1,1483 @@ +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var R = 0 + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++ +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' +var NUMERICIDENTIFIERLOOSE = R++ +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++ +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++ +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')' + +var MAINVERSIONLOOSE = R++ +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++ +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +var PRERELEASEIDENTIFIERLOOSE = R++ +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++ +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' + +var PRERELEASELOOSE = R++ +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++ +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++ +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++ +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?' + +src[FULL] = '^' + FULLPLAIN + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?' + +var LOOSE = R++ +src[LOOSE] = '^' + LOOSEPLAIN + '$' + +var GTLT = R++ +src[GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++ +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +var XRANGEIDENTIFIER = R++ +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' + +var XRANGEPLAIN = R++ +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGEPLAINLOOSE = R++ +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?' + +var XRANGE = R++ +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' +var XRANGELOOSE = R++ +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++ +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++ +src[LONETILDE] = '(?:~>?)' + +var TILDETRIM = R++ +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +var TILDE = R++ +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' +var TILDELOOSE = R++ +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++ +src[LONECARET] = '(?:\\^)' + +var CARETTRIM = R++ +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +var CARET = R++ +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' +var CARETLOOSE = R++ +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++ +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' +var COMPARATOR = R++ +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++ +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++ +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$' + +var HYPHENRANGELOOSE = R++ +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +var STAR = R++ +src[STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[LOOSE] : re[FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compare(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.rcompare(a, b, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY) { + return true + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return thisComparators.every(function (thisComparator) { + return range.set.some(function (rangeComparators) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + }) + }) +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 000000000..d475869cb --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "cross-spawn@6.0.5", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "cross-spawn@6.0.5", + "_id": "cross-spawn@6.0.5", + "_inBundle": false, + "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "_location": "/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cross-spawn@6.0.5", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "6.0.5", + "saveSpec": null, + "fetchSpec": "6.0.5" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "_spec": "6.0.5", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@commitlint/cli": "^6.0.0", + "@commitlint/config-conventional": "^6.0.2", + "babel-core": "^6.26.0", + "babel-jest": "^22.1.0", + "babel-preset-moxy": "^2.2.1", + "eslint": "^4.3.0", + "eslint-config-moxy": "^5.0.0", + "husky": "^0.14.3", + "jest": "^22.0.0", + "lint-staged": "^7.0.0", + "mkdirp": "^0.5.1", + "regenerator-runtime": "^0.11.1", + "rimraf": "^2.6.2", + "standard-version": "^4.2.0" + }, + "engines": { + "node": ">=4.8" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", + "lint": "eslint .", + "precommit": "lint-staged", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master && npm publish" + } + }, + "version": "6.0.5" +} diff --git a/node_modules/deepmerge/changelog.md b/node_modules/deepmerge/changelog.md new file mode 100644 index 000000000..7bd34c73e --- /dev/null +++ b/node_modules/deepmerge/changelog.md @@ -0,0 +1,133 @@ +# [4.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.0.0) + +- The `main` entry point in `package.json` is now a CommonJS module instead of a UMD module [#155](https://github.com/TehShrike/deepmerge/pull/155) + +# [3.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.3.0) + +- Enumerable Symbol properties are now copied [#151](https://github.com/TehShrike/deepmerge/pull/151) + +# [3.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.1) + +- bumping dev dependency versions to try to shut up bogus security warnings from Github/npm [#149](https://github.com/TehShrike/deepmerge/pull/149) + +# [3.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.0) + +- feature: added the [`customMerge`](https://github.com/TehShrike/deepmerge#custommerge) option [#133](https://github.com/TehShrike/deepmerge/pull/133) + +# [3.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.1.0) + +- typescript typing: make the `all` function generic [#129](https://github.com/TehShrike/deepmerge/pull/129) + +# [3.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.0.0) + +- drop ES module build [#123](https://github.com/TehShrike/deepmerge/issues/123) + +# [2.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.1) + +- bug: typescript export type was wrong [#121](https://github.com/TehShrike/deepmerge/pull/121) + +# [2.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.0) + +- feature: added TypeScript typings [#119](https://github.com/TehShrike/deepmerge/pull/119) + +# [2.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.1) + +- documentation: Rename "methods" to "api", note ESM syntax [#103](https://github.com/TehShrike/deepmerge/pull/103) +- documentation: Fix grammar [#107](https://github.com/TehShrike/deepmerge/pull/107) +- documentation: Restructure headers for clarity + some wording tweaks [108](https://github.com/TehShrike/deepmerge/pull/108) + [109](https://github.com/TehShrike/deepmerge/pull/109) + + +# [2.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.0) + +- feature: Support a custom `isMergeableObject` function [#96](https://github.com/TehShrike/deepmerge/pull/96) +- documentation: note a Webpack bug that some users might need to work around [#100](https://github.com/TehShrike/deepmerge/pull/100) + +# [2.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.1) + +- documentation: fix the old array merge algorithm in the readme. [#84](https://github.com/TehShrike/deepmerge/pull/84) + +# [2.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.0) + +- breaking: the array merge algorithm has changed from a complicated thing to `target.concat(source).map(element => cloneUnlessOtherwiseSpecified(element, optionsArgument))` +- breaking: The `clone` option now defaults to `true` +- feature: `merge.all` now accepts an array of any size, even 0 or 1 elements + +See [pull request 77](https://github.com/TehShrike/deepmerge/pull/77). + +# [1.5.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.2) + +- fix: no longer attempts to merge React elements [#76](https://github.com/TehShrike/deepmerge/issues/76) + +# [1.5.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.1) + +- bower support: officially dropping bower support. If you use bower, please depend on the [unpkg distribution](https://unpkg.com/deepmerge/dist/umd.js). See [#63](https://github.com/TehShrike/deepmerge/issues/63) + +# [1.5.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.0) + +- bug fix: merging objects into arrays was allowed, and doesn't make any sense. [#65](https://github.com/TehShrike/deepmerge/issues/65) published as a feature release instead of a patch because it is a decent behavior change. + +# [1.4.4](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.4) + +- bower support: updated `main` in bower.json + +# [1.4.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.3) + +- bower support: inline is-mergeable-object in a new CommonJS build, so that people using both bower and CommonJS can bundle the library [0b34e6](https://github.com/TehShrike/deepmerge/commit/0b34e6e95f989f2fc8091d25f0d291c08f3d2d24) + +# [1.4.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.2) + +- performance: bump is-mergeable-object dependency version for a slight performance improvement [5906c7](https://github.com/TehShrike/deepmerge/commit/5906c765d691d48e83d76efbb0d4b9ca150dc12c) + +# [1.4.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.1) + +- documentation: fix unpkg link [acc45b](https://github.com/TehShrike/deepmerge/commit/acc45be85519c1df906a72ecb24764b622d18d47) + +# [1.4.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.0) + +- api: instead of only exporting a UMD module, expose a UMD module with `pkg.main`, a CJS module with `pkg.browser`, and an ES module with `pkg.module` [#62](https://github.com/TehShrike/deepmerge/pull/62) + +# [1.3.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.2) + +- documentation: note the minified/gzipped file sizes [56](https://github.com/TehShrike/deepmerge/pull/56) +- documentation: make data structures more readable in merge example: pull request [57](https://github.com/TehShrike/deepmerge/pull/57) + +# [1.3.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.1) + +- documentation: clarify and test some array merging documentation: pull request [51](https://github.com/TehShrike/deepmerge/pull/51) + +# [1.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.0) + +- feature: `merge.all`, a merge function that merges any number of objects: pull request [50](https://github.com/TehShrike/deepmerge/pull/50) + +# [1.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.2.0) + +- fix: an error that would be thrown when an array would be merged onto a truthy non-array value: pull request [46](https://github.com/TehShrike/deepmerge/pull/46) +- feature: the ability to clone: Issue [28](https://github.com/TehShrike/deepmerge/issues/28), pull requests [44](https://github.com/TehShrike/deepmerge/pull/44) and [48](https://github.com/TehShrike/deepmerge/pull/48) +- maintenance: added tests + travis to `.npmignore`: pull request [47](https://github.com/TehShrike/deepmerge/pull/47) + +# [1.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.1) + +- fix an issue where an error was thrown when merging an array onto a non-array: [Pull request 46](https://github.com/TehShrike/deepmerge/pull/46) + +# [1.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.0) + +- allow consumers to specify their own array merging algorithm: [Pull request 37](https://github.com/TehShrike/deepmerge/pull/37) + +# [1.0.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.3) + +- adding bower.json back: [Issue 38](https://github.com/TehShrike/deepmerge/pull/38) +- updating keywords and Github links in package.json [bc3898e](https://github.com/TehShrike/deepmerge/commit/bc3898e587a56f74591328f40f656b0152c1d5eb) + +# [1.0.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.2) + +- Updating the readme: dropping bower, testing that the example works: [7102fc](https://github.com/TehShrike/deepmerge/commit/7102fcc4ddec11e2d33205866f9f18df14e5aeb5) + +# [1.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.1) + +- `null`, dates, and regular expressions are now properly merged in arrays: [Issue 18](https://github.com/TehShrike/deepmerge/pull/18), plus commit: [ef1c6b](https://github.com/TehShrike/deepmerge/commit/ef1c6bac8350ba12a24966f0bc7da02560827586) + +# 1.0.0 + +- Should only be a patch change, because this module is READY. [Issue 15](https://github.com/TehShrike/deepmerge/issues/15) +- Regular expressions are now treated like primitive values when merging: [Issue 30](https://github.com/TehShrike/deepmerge/pull/30) +- Dates are now treated like primitives when merging: [Issue 31](https://github.com/TehShrike/deepmerge/issues/31) diff --git a/node_modules/deepmerge/dist/cjs.js b/node_modules/deepmerge/dist/cjs.js new file mode 100644 index 000000000..9df057617 --- /dev/null +++ b/node_modules/deepmerge/dist/cjs.js @@ -0,0 +1,111 @@ +'use strict'; + +var isMergeableObject = function isMergeableObject(value) { + return isNonNullObject(value) + && !isSpecial(value) +}; + +function isNonNullObject(value) { + return !!value && typeof value === 'object' +} + +function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + + return stringValue === '[object RegExp]' + || stringValue === '[object Date]' + || isReactElement(value) +} + +// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 +var canUseSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; + +function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE +} + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneUnlessOtherwiseSpecified(value, options) { + return (options.clone !== false && options.isMergeableObject(value)) + ? deepmerge(emptyTarget(value), value, options) + : value +} + +function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options) + }) +} + +function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge + } + var customMerge = options.customMerge(key); + return typeof customMerge === 'function' ? customMerge : deepmerge +} + +function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return target.propertyIsEnumerable(symbol) + }) + : [] +} + +function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) +} + +function mergeObject(target, source, options) { + var destination = {}; + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); + }); + } + getKeys(source).forEach(function(key) { + if (!options.isMergeableObject(source[key]) || !target[key]) { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); + } else { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options); + } + }); + return destination +} + +function deepmerge(target, source, options) { + options = options || {}; + options.arrayMerge = options.arrayMerge || defaultArrayMerge; + options.isMergeableObject = options.isMergeableObject || isMergeableObject; + + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options) + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options) + } else { + return mergeObject(target, source, options) + } +} + +deepmerge.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error('first argument should be an array') + } + + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options) + }, {}) +}; + +var deepmerge_1 = deepmerge; + +module.exports = deepmerge_1; diff --git a/node_modules/deepmerge/dist/umd.js b/node_modules/deepmerge/dist/umd.js new file mode 100644 index 000000000..8ce3a27a9 --- /dev/null +++ b/node_modules/deepmerge/dist/umd.js @@ -0,0 +1,117 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.deepmerge = factory()); +}(this, function () { 'use strict'; + + var isMergeableObject = function isMergeableObject(value) { + return isNonNullObject(value) + && !isSpecial(value) + }; + + function isNonNullObject(value) { + return !!value && typeof value === 'object' + } + + function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + + return stringValue === '[object RegExp]' + || stringValue === '[object Date]' + || isReactElement(value) + } + + // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 + var canUseSymbol = typeof Symbol === 'function' && Symbol.for; + var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; + + function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE + } + + function emptyTarget(val) { + return Array.isArray(val) ? [] : {} + } + + function cloneUnlessOtherwiseSpecified(value, options) { + return (options.clone !== false && options.isMergeableObject(value)) + ? deepmerge(emptyTarget(value), value, options) + : value + } + + function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options) + }) + } + + function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge + } + var customMerge = options.customMerge(key); + return typeof customMerge === 'function' ? customMerge : deepmerge + } + + function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return target.propertyIsEnumerable(symbol) + }) + : [] + } + + function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) + } + + function mergeObject(target, source, options) { + var destination = {}; + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); + }); + } + getKeys(source).forEach(function(key) { + if (!options.isMergeableObject(source[key]) || !target[key]) { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); + } else { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options); + } + }); + return destination + } + + function deepmerge(target, source, options) { + options = options || {}; + options.arrayMerge = options.arrayMerge || defaultArrayMerge; + options.isMergeableObject = options.isMergeableObject || isMergeableObject; + + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options) + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options) + } else { + return mergeObject(target, source, options) + } + } + + deepmerge.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error('first argument should be an array') + } + + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options) + }, {}) + }; + + var deepmerge_1 = deepmerge; + + return deepmerge_1; + +})); diff --git a/node_modules/deepmerge/index.d.ts b/node_modules/deepmerge/index.d.ts new file mode 100644 index 000000000..7412fcf18 --- /dev/null +++ b/node_modules/deepmerge/index.d.ts @@ -0,0 +1,16 @@ +declare function deepmerge(x: Partial, y: Partial, options?: deepmerge.Options): T; +declare function deepmerge(x: Partial, y: Partial, options?: deepmerge.Options): T1 & T2; + +declare namespace deepmerge { + export interface Options { + arrayMerge?(target: any[], source: any[], options?: Options): any[]; + clone?: boolean; + customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined; + isMergeableObject?(value: object): boolean; + } + + export function all (objects: object[], options?: Options): object; + export function all (objects: Partial[], options?: Options): T; +} + +export = deepmerge; diff --git a/node_modules/deepmerge/index.js b/node_modules/deepmerge/index.js new file mode 100644 index 000000000..9c143c780 --- /dev/null +++ b/node_modules/deepmerge/index.js @@ -0,0 +1,84 @@ +var defaultIsMergeableObject = require('is-mergeable-object') + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneUnlessOtherwiseSpecified(value, options) { + return (options.clone !== false && options.isMergeableObject(value)) + ? deepmerge(emptyTarget(value), value, options) + : value +} + +function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options) + }) +} + +function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge + } + var customMerge = options.customMerge(key) + return typeof customMerge === 'function' ? customMerge : deepmerge +} + +function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return target.propertyIsEnumerable(symbol) + }) + : [] +} + +function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) +} + +function mergeObject(target, source, options) { + var destination = {} + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options) + }) + } + getKeys(source).forEach(function(key) { + if (!options.isMergeableObject(source[key]) || !target[key]) { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options) + } else { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options) + } + }) + return destination +} + +function deepmerge(target, source, options) { + options = options || {} + options.arrayMerge = options.arrayMerge || defaultArrayMerge + options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject + + var sourceIsArray = Array.isArray(source) + var targetIsArray = Array.isArray(target) + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray + + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options) + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options) + } else { + return mergeObject(target, source, options) + } +} + +deepmerge.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error('first argument should be an array') + } + + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options) + }, {}) +} + +module.exports = deepmerge diff --git a/node_modules/deepmerge/license.txt b/node_modules/deepmerge/license.txt new file mode 100644 index 000000000..500307871 --- /dev/null +++ b/node_modules/deepmerge/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2012 James Halliday, Josh Duff, and other 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/node_modules/deepmerge/package.json b/node_modules/deepmerge/package.json new file mode 100644 index 000000000..05ee2167b --- /dev/null +++ b/node_modules/deepmerge/package.json @@ -0,0 +1,71 @@ +{ + "_from": "deepmerge@4.0.0", + "_id": "deepmerge@4.0.0", + "_inBundle": false, + "_integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww==", + "_location": "/deepmerge", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "deepmerge@4.0.0", + "name": "deepmerge", + "escapedName": "deepmerge", + "rawSpec": "4.0.0", + "saveSpec": null, + "fetchSpec": "4.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint" + ], + "_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz", + "_shasum": "3e3110ca29205f120d7cb064960a39c3d2087c09", + "_spec": "deepmerge@4.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint", + "bugs": { + "url": "https://github.com/TehShrike/deepmerge/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "A library for deep (recursive) merging of Javascript objects", + "devDependencies": { + "@types/node": "^8.10.49", + "is-mergeable-object": "1.1.0", + "is-plain-object": "^2.0.4", + "jsmd": "^1.0.1", + "rollup": "^1.15.5", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-node-resolve": "^5.0.2", + "tape": "^4.10.2", + "ts-node": "7.0.1", + "typescript": "=2.2.2", + "uglify-js": "^3.6.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/TehShrike/deepmerge", + "keywords": [ + "merge", + "deep", + "extend", + "copy", + "clone", + "recursive" + ], + "license": "MIT", + "main": "dist/cjs.js", + "name": "deepmerge", + "repository": { + "type": "git", + "url": "git://github.com/TehShrike/deepmerge.git" + }, + "scripts": { + "build": "rollup -c", + "size": "npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c", + "test": "npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript", + "test:typescript": "tsc --noEmit test/typescript.ts && ts-node test/typescript.ts" + }, + "version": "4.0.0" +} diff --git a/node_modules/deepmerge/readme.md b/node_modules/deepmerge/readme.md new file mode 100644 index 000000000..915d157de --- /dev/null +++ b/node_modules/deepmerge/readme.md @@ -0,0 +1,264 @@ +# deepmerge + +Merges the enumerable properties of two or more objects deeply. + +> UMD bundle is 646B minified+gzipped + +## Getting Started + +### Example Usage + + +```js +const x = { + foo: { bar: 3 }, + array: [{ + does: 'work', + too: [ 1, 2, 3 ] + }] +} + +const y = { + foo: { baz: 4 }, + quux: 5, + array: [{ + does: 'work', + too: [ 4, 5, 6 ] + }, { + really: 'yes' + }] +} + +const output = { + foo: { + bar: 3, + baz: 4 + }, + array: [{ + does: 'work', + too: [ 1, 2, 3 ] + }, { + does: 'work', + too: [ 4, 5, 6 ] + }, { + really: 'yes' + }], + quux: 5 +} + +merge(x, y) // => output +``` + + +### Installation + +With [npm](http://npmjs.org) do: + +```sh +npm install deepmerge +``` + +deepmerge can be used directly in the browser without the use of package managers/bundlers as well: [UMD version from unpkg.com](https://unpkg.com/deepmerge/dist/umd.js). + + +### Include + +deepmerge exposes a CommonJS entry point: + +``` +const merge = require('deepmerge') +``` + +The ESM entry point was dropped due to a [Webpack bug](https://github.com/webpack/webpack/issues/6584). + +# API + + +## `merge(x, y, [options])` + +Merge two objects `x` and `y` deeply, returning a new merged object with the +elements from both `x` and `y`. + +If an element at the same key is present for both `x` and `y`, the value from +`y` will appear in the result. + +Merging creates a new object, so that neither `x` or `y` is modified. + +**Note:** By default, arrays are merged by concatenating them. + +## `merge.all(arrayOfObjects, [options])` + +Merges any number of objects into a single result object. + +```js +const foobar = { foo: { bar: 3 } } +const foobaz = { foo: { baz: 4 } } +const bar = { bar: 'yay!' } + +merge.all([ foobar, foobaz, bar ]) // => { foo: { bar: 3, baz: 4 }, bar: 'yay!' } +``` + + +## Options + +### `arrayMerge` + +There are multiple ways to merge two arrays, below are a few examples but you can also create your own custom function. + +#### Overwrite Array + +Overwrites the existing array values completely rather than concatenating them + +```js +const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray + +merge( + [1, 2, 3], + [3, 2, 1], + { arrayMerge: overwriteMerge } +) // => [3, 2, 1] +``` + +#### Combine Array + +Combine arrays, such as overwriting existing defaults while also adding/keeping values that are different names + +To use the legacy (pre-version-2.0.0) array merging algorithm, use the following: + +```js +const emptyTarget = value => Array.isArray(value) ? [] : {} +const clone = (value, options) => merge(emptyTarget(value), value, options) + +const combineMerge = (target, source, options) => { + const destination = target.slice() + + source.forEach((item, index) => { + if (typeof destination[index] === 'undefined') { + const cloneRequested = options.clone !== false + const shouldClone = cloneRequested && options.isMergeableObject(item) + destination[index] = shouldClone ? clone(item, options) : item + } else if (options.isMergeableObject(item)) { + destination[index] = merge(target[index], item, options) + } else if (target.indexOf(item) === -1) { + destination.push(item) + } + }) + return destination +} + +merge( + [{ a: true }], + [{ b: true }, 'ah yup'], + { arrayMerge: combineMerge } +) // => [{ a: true, b: true }, 'ah yup'] +``` + +### `isMergeableObject` + +By default, deepmerge clones every property from almost every kind of object. + +You may not want this, if your objects are of special types, and you want to copy the whole object instead of just copying its properties. + +You can accomplish this by passing in a function for the `isMergeableObject` option. + +If you only want to clone properties of plain objects, and ignore all "special" kinds of instantiated objects, you probably want to drop in [`is-plain-object`](https://github.com/jonschlinkert/is-plain-object). + +```js +const isPlainObject = require('is-plain-object') + +function SuperSpecial() { + this.special = 'oh yeah man totally' +} + +const instantiatedSpecialObject = new SuperSpecial() + +const target = { + someProperty: { + cool: 'oh for sure' + } +} + +const source = { + someProperty: instantiatedSpecialObject +} + +const defaultOutput = merge(target, source) + +defaultOutput.someProperty.cool // => 'oh for sure' +defaultOutput.someProperty.special // => 'oh yeah man totally' +defaultOutput.someProperty instanceof SuperSpecial // => false + +const customMergeOutput = merge(target, source, { + isMergeableObject: isPlainObject +}) + +customMergeOutput.someProperty.cool // => undefined +customMergeOutput.someProperty.special // => 'oh yeah man totally' +customMergeOutput.someProperty instanceof SuperSpecial // => true +``` + +### `customMerge` + +Specifies a function which can be used to override the default merge behavior for a property, based on the property name. + +The `customMerge` function will be passed the key for each property, and should return the function which should be used to merge the values for that property. + +It may also return undefined, in which case the default merge behaviour will be used. + +```js +const alex = { + name: { + first: 'Alex', + last: 'Alexson' + }, + pets: ['Cat', 'Parrot'] +} + +const tony = { + name: { + first: 'Tony', + last: 'Tonison' + }, + pets: ['Dog'] +} + +const mergeNames = (nameA, nameB) => `${nameA.first} and ${nameB.first}` + +const options = { + customMerge: (key) => { + if (key === 'name') { + return mergeNames + } + } +} + +const result = merge(alex, tony, options) + +result.name // => 'Alex and Tony' +result.pets // => ['Cat', 'Parrot', 'Dog'] +``` + + +### `clone` + +*Deprecated.* + +Defaults to `true`. + +If `clone` is `false` then child objects will be copied directly instead of being cloned. This was the default behavior before version 2.x. + + +# Testing + +With [npm](http://npmjs.org) do: + +```sh +npm test +``` + + +# License + +MIT diff --git a/node_modules/deepmerge/rollup.config.js b/node_modules/deepmerge/rollup.config.js new file mode 100644 index 000000000..8323ab27e --- /dev/null +++ b/node_modules/deepmerge/rollup.config.js @@ -0,0 +1,22 @@ +import resolve from 'rollup-plugin-node-resolve' +import commonjs from 'rollup-plugin-commonjs' +import pkg from './package.json' + +export default { + input: `index.js`, + plugins: [ + commonjs(), + resolve(), + ], + output: [ + { + file: pkg.main, + format: `cjs` + }, + { + name: 'deepmerge', + file: 'dist/umd.js', + format: `umd` + }, + ], +} diff --git a/node_modules/deprecation/LICENSE b/node_modules/deprecation/LICENSE new file mode 100644 index 000000000..1683b5838 --- /dev/null +++ b/node_modules/deprecation/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Gregor Martynus and contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/deprecation/README.md b/node_modules/deprecation/README.md new file mode 100644 index 000000000..648809d5d --- /dev/null +++ b/node_modules/deprecation/README.md @@ -0,0 +1,77 @@ +# deprecation + +> Log a deprecation message with stack + +![build](https://action-badges.now.sh/gr2m/deprecation) + +## Usage + + + + + + +
+Browsers + + +Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev) + +```html + +``` + +
+Node + + +Install with `npm install deprecation` + +```js +const { Deprecation } = require("deprecation"); +// or: import { Deprecation } from "deprecation"; +``` + +
+ +```js +function foo() { + bar(); +} + +function bar() { + baz(); +} + +function baz() { + console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +// { Deprecation: [my-lib] foo() is deprecated, use bar() +// at baz (/path/to/file.js:12:15) +// at bar (/path/to/file.js:8:3) +// at foo (/path/to/file.js:4:3) +``` + +To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module. + +```js +const Deprecation = require("deprecation"); +const once = require("once"); + +const deprecateFoo = once(console.warn); + +function foo() { + deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +foo(); // logs nothing +``` + +## License + +[ISC](LICENSE) diff --git a/node_modules/deprecation/dist-node/index.js b/node_modules/deprecation/dist-node/index.js new file mode 100644 index 000000000..9da177570 --- /dev/null +++ b/node_modules/deprecation/dist-node/index.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +exports.Deprecation = Deprecation; diff --git a/node_modules/deprecation/dist-src/index.js b/node_modules/deprecation/dist-src/index.js new file mode 100644 index 000000000..7950fdc06 --- /dev/null +++ b/node_modules/deprecation/dist-src/index.js @@ -0,0 +1,14 @@ +export class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} \ No newline at end of file diff --git a/node_modules/deprecation/dist-types/index.d.ts b/node_modules/deprecation/dist-types/index.d.ts new file mode 100644 index 000000000..e3ae7ad42 --- /dev/null +++ b/node_modules/deprecation/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export class Deprecation extends Error { + name: "Deprecation"; +} diff --git a/node_modules/deprecation/dist-web/index.js b/node_modules/deprecation/dist-web/index.js new file mode 100644 index 000000000..c6bbda759 --- /dev/null +++ b/node_modules/deprecation/dist-web/index.js @@ -0,0 +1,16 @@ +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +export { Deprecation }; diff --git a/node_modules/deprecation/package.json b/node_modules/deprecation/package.json new file mode 100644 index 000000000..9ad226a04 --- /dev/null +++ b/node_modules/deprecation/package.json @@ -0,0 +1,65 @@ +{ + "_from": "deprecation@^2.0.0", + "_id": "deprecation@2.3.1", + "_inBundle": false, + "_integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "_location": "/deprecation", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "deprecation@^2.0.0", + "name": "deprecation", + "escapedName": "deprecation", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "_shasum": "6368cbdb40abf3373b525ac87e4a260c3a700919", + "_spec": "deprecation@^2.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "bugs": { + "url": "https://github.com/gr2m/deprecation/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Log a deprecation message with stack", + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.4.0", + "@pika/plugin-build-types": "^0.4.0", + "@pika/plugin-build-web": "^0.4.0", + "@pika/plugin-standard-pkg": "^0.4.0", + "semantic-release": "^15.13.3" + }, + "esnext": "dist-src/index.js", + "files": [ + "dist-*/", + "bin/" + ], + "homepage": "https://github.com/gr2m/deprecation#readme", + "keywords": [ + "deprecate", + "deprecated", + "deprecation" + ], + "license": "ISC", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "name": "deprecation", + "pika": true, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/deprecation.git" + }, + "sideEffects": false, + "types": "dist-types/index.d.ts", + "version": "2.3.1" +} diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE new file mode 100644 index 000000000..757562ec5 --- /dev/null +++ b/node_modules/end-of-stream/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +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. \ No newline at end of file diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md new file mode 100644 index 000000000..f2560c939 --- /dev/null +++ b/node_modules/end-of-stream/README.md @@ -0,0 +1,52 @@ +# end-of-stream + +A node module that calls a callback when a readable/writable/duplex stream has completed or failed. + + npm install end-of-stream + +## Usage + +Simply pass a stream and a callback to the `eos`. +Both legacy streams, streams2 and stream3 are supported. + +``` js +var eos = require('end-of-stream'); + +eos(readableStream, function(err) { + // this will be set to the stream instance + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended', this === readableStream); +}); + +eos(writableStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished', this === writableStream); +}); + +eos(duplexStream, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended and finished', this === duplexStream); +}); + +eos(duplexStream, {readable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has finished but might still be readable'); +}); + +eos(duplexStream, {writable:false}, function(err) { + if (err) return console.log('stream had an error or closed early'); + console.log('stream has ended but might still be writable'); +}); + +eos(readableStream, {error:false}, function(err) { + // do not treat emit('error', err) as a end-of-stream +}); +``` + +## License + +MIT + +## Related + +`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js new file mode 100644 index 000000000..be426c227 --- /dev/null +++ b/node_modules/end-of-stream/index.js @@ -0,0 +1,87 @@ +var once = require('once'); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json new file mode 100644 index 000000000..511e7f106 --- /dev/null +++ b/node_modules/end-of-stream/package.json @@ -0,0 +1,66 @@ +{ + "_args": [ + [ + "end-of-stream@1.4.1", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "end-of-stream@1.4.1", + "_id": "end-of-stream@1.4.1", + "_inBundle": false, + "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "_location": "/end-of-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "end-of-stream@1.4.1", + "name": "end-of-stream", + "escapedName": "end-of-stream", + "rawSpec": "1.4.1", + "saveSpec": null, + "fetchSpec": "1.4.1" + }, + "_requiredBy": [ + "/pump" + ], + "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "_spec": "1.4.1", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Mathias Buus", + "email": "mathiasbuus@gmail.com" + }, + "bugs": { + "url": "https://github.com/mafintosh/end-of-stream/issues" + }, + "dependencies": { + "once": "^1.4.0" + }, + "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", + "files": [ + "index.js" + ], + "homepage": "https://github.com/mafintosh/end-of-stream", + "keywords": [ + "stream", + "streams", + "callback", + "finish", + "close", + "end", + "wait" + ], + "license": "MIT", + "main": "index.js", + "name": "end-of-stream", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/end-of-stream.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.4.1" +} diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js new file mode 100644 index 000000000..aad9ac887 --- /dev/null +++ b/node_modules/execa/index.js @@ -0,0 +1,361 @@ +'use strict'; +const path = require('path'); +const childProcess = require('child_process'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js new file mode 100644 index 000000000..e367837b2 --- /dev/null +++ b/node_modules/execa/lib/errname.js @@ -0,0 +1,39 @@ +'use strict'; +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = require('util'); + +let uv; + +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } + + module.exports = code => errname(uv, code); +} + +// Used for testing the fallback behavior +module.exports.__test__ = errname; + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js new file mode 100644 index 000000000..a82d46838 --- /dev/null +++ b/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/execa/license b/node_modules/execa/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/execa/package.json b/node_modules/execa/package.json new file mode 100644 index 000000000..c33baa301 --- /dev/null +++ b/node_modules/execa/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + "execa@1.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "execa@1.0.0", + "_id": "execa@1.0.0", + "_inBundle": false, + "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "_location": "/execa", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "execa@1.0.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/husky", + "/jest-changed-files", + "/os-locale", + "/sane", + "/windows-release" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^3.0.1", + "delay": "^3.0.0", + "is-running": "^2.0.0", + "nyc": "^13.0.1", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md new file mode 100644 index 000000000..f3f533d92 --- /dev/null +++ b/node_modules/execa/readme.md @@ -0,0 +1,327 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install execa +``` + + + + + + +## Usage + +```js +const execa = require('execa'); + +(async () => { + const {stdout} = await execa('echo', ['unicorns']); + console.log(stdout); + //=> 'unicorns' +})(); +``` + +Additional examples: + +```js +const execa = require('execa'); + +(async () => { + // Pipe the child process stdout to the current stdout + execa('echo', ['unicorns']).stdout.pipe(process.stdout); + + + // Run a shell command + const {stdout} = await execa.shell('echo unicorns'); + //=> 'unicorns' + + + // Catching an error + try { + await execa.shell('exit 3'); + } catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ + } +})(); + +// Catching an error with a sync method +try { + execa.shellSync('exit 3'); +} catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +} +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `string[]` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### buffer + +Type: `boolean`
+Default: `true` + +Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### windowsVerbatimArguments + +Type: `boolean`
+Default: `false` + +If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js new file mode 100644 index 000000000..4121c8e56 --- /dev/null +++ b/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const {PassThrough} = require('stream'); + +module.exports = options => { + options = Object.assign({}, options); + + const {array} = options; + let {encoding} = options; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js new file mode 100644 index 000000000..7e5584a63 --- /dev/null +++ b/node_modules/get-stream/index.js @@ -0,0 +1,50 @@ +'use strict'; +const pump = require('pump'); +const bufferStream = require('./buffer-stream'); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + options = Object.assign({maxBuffer: Infinity}, options); + + const {maxBuffer} = options; + + let stream; + return new Promise((resolve, reject) => { + const rejectPromise = error => { + if (error) { // A null check + error.bufferedData = stream.getBufferedValue(); + } + reject(error); + }; + + stream = pump(inputStream, bufferStream(options), error => { + if (error) { + rejectPromise(error); + return; + } + + resolve(); + }); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }).then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); +module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); +module.exports.MaxBufferError = MaxBufferError; diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/get-stream/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/get-stream/package.json b/node_modules/get-stream/package.json new file mode 100644 index 000000000..d2fd9cc9e --- /dev/null +++ b/node_modules/get-stream/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "get-stream@4.1.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "get-stream@4.1.0", + "_id": "get-stream@4.1.0", + "_inBundle": false, + "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "_location": "/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "get-stream@4.1.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "4.1.0", + "saveSpec": null, + "fetchSpec": "4.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "_spec": "4.1.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "dependencies": { + "pump": "^3.0.0" + }, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md new file mode 100644 index 000000000..b87a4d37c --- /dev/null +++ b/node_modules/get-stream/readme.md @@ -0,0 +1,123 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); + +(async () => { + const stream = fs.createReadStream('unicorn.txt'); + + console.log(await getStream(stream)); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +})(); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +Type: `Object` + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +(async () => { + try { + await getStream(streamThatErrorsAtTheEnd('unicorn')); + } catch (error) { + console.log(error.bufferedData); + //=> 'unicorn' + } +})() +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js new file mode 100644 index 000000000..6f7ec91a4 --- /dev/null +++ b/node_modules/is-stream/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; + +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/is-stream/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/is-stream/package.json b/node_modules/is-stream/package.json new file mode 100644 index 000000000..c4a2da976 --- /dev/null +++ b/node_modules/is-stream/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + "is-stream@1.1.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "is-stream@1.1.0", + "_id": "is-stream@1.1.0", + "_inBundle": false, + "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "_location": "/is-stream", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "is-stream@1.1.0", + "name": "is-stream", + "escapedName": "is-stream", + "rawSpec": "1.1.0", + "saveSpec": null, + "fetchSpec": "1.1.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "_spec": "1.1.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-stream/issues" + }, + "description": "Check if something is a Node.js stream", + "devDependencies": { + "ava": "*", + "tempfile": "^1.1.0", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-stream#readme", + "keywords": [ + "stream", + "type", + "streams", + "writable", + "readable", + "duplex", + "transform", + "check", + "detect", + "is" + ], + "license": "MIT", + "name": "is-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md new file mode 100644 index 000000000..d8afce81d --- /dev/null +++ b/node_modules/is-stream/readme.md @@ -0,0 +1,42 @@ +# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) + +> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) + + +## Install + +``` +$ npm install --save is-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const isStream = require('is-stream'); + +isStream(fs.createReadStream('unicorn.png')); +//=> true + +isStream({}); +//=> false +``` + + +## API + +### isStream(stream) + +#### isStream.writable(stream) + +#### isStream.readable(stream) + +#### isStream.duplex(stream) + +#### isStream.transform(stream) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore new file mode 100644 index 000000000..c1cb757ac --- /dev/null +++ b/node_modules/isexe/.npmignore @@ -0,0 +1,2 @@ +.nyc_output/ +coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md new file mode 100644 index 000000000..35769e844 --- /dev/null +++ b/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js new file mode 100644 index 000000000..553fb32b1 --- /dev/null +++ b/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js new file mode 100644 index 000000000..1995ea4a0 --- /dev/null +++ b/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json new file mode 100644 index 000000000..3784f2a5f --- /dev/null +++ b/node_modules/isexe/package.json @@ -0,0 +1,64 @@ +{ + "_args": [ + [ + "isexe@2.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "isexe@2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "isexe@2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "2.0.0", + "saveSpec": null, + "fetchSpec": "2.0.0" + }, + "_requiredBy": [ + "/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_spec": "2.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js new file mode 100644 index 000000000..d926df64b --- /dev/null +++ b/node_modules/isexe/test/basic.js @@ -0,0 +1,221 @@ +var t = require('tap') +var fs = require('fs') +var path = require('path') +var fixture = path.resolve(__dirname, 'fixtures') +var meow = fixture + '/meow.cat' +var mine = fixture + '/mine.cat' +var ours = fixture + '/ours.cat' +var fail = fixture + '/fail.false' +var noent = fixture + '/enoent.exe' +var mkdirp = require('mkdirp') +var rimraf = require('rimraf') + +var isWindows = process.platform === 'win32' +var hasAccess = typeof fs.access === 'function' +var winSkip = isWindows && 'windows' +var accessSkip = !hasAccess && 'no fs.access function' +var hasPromise = typeof Promise === 'function' +var promiseSkip = !hasPromise && 'no global Promise' + +function reset () { + delete require.cache[require.resolve('../')] + return require('../') +} + +t.test('setup fixtures', function (t) { + rimraf.sync(fixture) + mkdirp.sync(fixture) + fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') + fs.chmodSync(meow, parseInt('0755', 8)) + fs.writeFileSync(fail, '#!/usr/bin/env false\n') + fs.chmodSync(fail, parseInt('0644', 8)) + fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') + fs.chmodSync(mine, parseInt('0744', 8)) + fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') + fs.chmodSync(ours, parseInt('0754', 8)) + t.end() +}) + +t.test('promise', { skip: promiseSkip }, function (t) { + var isexe = reset() + t.test('meow async', function (t) { + isexe(meow).then(function (is) { + t.ok(is) + t.end() + }) + }) + t.test('fail async', function (t) { + isexe(fail).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.test('noent async', function (t) { + isexe(noent).catch(function (er) { + t.ok(er) + t.end() + }) + }) + t.test('noent ignore async', function (t) { + isexe(noent, { ignoreErrors: true }).then(function (is) { + t.notOk(is) + t.end() + }) + }) + t.end() +}) + +t.test('no promise', function (t) { + global.Promise = null + var isexe = reset() + t.throws('try to meow a promise', function () { + isexe(meow) + }) + t.end() +}) + +t.test('access', { skip: accessSkip || winSkip }, function (t) { + runTest(t) +}) + +t.test('mode', { skip: winSkip }, function (t) { + delete fs.access + delete fs.accessSync + var isexe = reset() + t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) + t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) + runTest(t) +}) + +t.test('windows', function (t) { + global.TESTING_WINDOWS = true + var pathExt = '.EXE;.CAT;.CMD;.COM' + t.test('pathExt option', function (t) { + runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) + }) + t.test('pathExt env', function (t) { + process.env.PATHEXT = pathExt + runTest(t) + }) + t.test('no pathExt', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: '', skipFail: true }) + }) + t.test('pathext with empty entry', function (t) { + // with a pathExt of '', any filename is fine. + // so the "fail" one would still pass. + runTest(t, { pathExt: ';' + pathExt, skipFail: true }) + }) + t.end() +}) + +t.test('cleanup', function (t) { + rimraf.sync(fixture) + t.end() +}) + +function runTest (t, options) { + var isexe = reset() + + var optionsIgnore = Object.create(options || {}) + optionsIgnore.ignoreErrors = true + + if (!options || !options.skipFail) { + t.notOk(isexe.sync(fail, options)) + } + t.notOk(isexe.sync(noent, optionsIgnore)) + if (!options) { + t.ok(isexe.sync(meow)) + } else { + t.ok(isexe.sync(meow, options)) + } + + t.ok(isexe.sync(mine, options)) + t.ok(isexe.sync(ours, options)) + t.throws(function () { + isexe.sync(noent, options) + }) + + t.test('meow async', function (t) { + if (!options) { + isexe(meow, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } else { + isexe(meow, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + } + }) + + t.test('mine async', function (t) { + isexe(mine, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + t.test('ours async', function (t) { + isexe(ours, options, function (er, is) { + if (er) { + throw er + } + t.ok(is) + t.end() + }) + }) + + if (!options || !options.skipFail) { + t.test('fail async', function (t) { + isexe(fail, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + } + + t.test('noent async', function (t) { + isexe(noent, options, function (er, is) { + t.ok(er) + t.notOk(is) + t.end() + }) + }) + + t.test('noent ignore async', function (t) { + isexe(noent, optionsIgnore, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.test('directory is not executable', function (t) { + isexe(__dirname, options, function (er, is) { + if (er) { + throw er + } + t.notOk(is) + t.end() + }) + }) + + t.end() +} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js new file mode 100644 index 000000000..34996734d --- /dev/null +++ b/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/node_modules/lodash.get/LICENSE b/node_modules/lodash.get/LICENSE new file mode 100644 index 000000000..e0c69d560 --- /dev/null +++ b/node_modules/lodash.get/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.get/README.md b/node_modules/lodash.get/README.md new file mode 100644 index 000000000..90796144c --- /dev/null +++ b/node_modules/lodash.get/README.md @@ -0,0 +1,18 @@ +# lodash.get v4.4.2 + +The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.get +``` + +In Node.js: +```js +var get = require('lodash.get'); +``` + +See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. diff --git a/node_modules/lodash.get/index.js b/node_modules/lodash.get/index.js new file mode 100644 index 000000000..0eaadec50 --- /dev/null +++ b/node_modules/lodash.get/index.js @@ -0,0 +1,931 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json new file mode 100644 index 000000000..7f6f80c4c --- /dev/null +++ b/node_modules/lodash.get/package.json @@ -0,0 +1,69 @@ +{ + "_from": "lodash.get@^4.4.2", + "_id": "lodash.get@4.4.2", + "_inBundle": false, + "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "_location": "/lodash.get", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lodash.get@^4.4.2", + "name": "lodash.get", + "escapedName": "lodash.get", + "rawSpec": "^4.4.2", + "saveSpec": null, + "fetchSpec": "^4.4.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "_shasum": "2d177f652fa31e939b4438d5341499dfa3825e99", + "_spec": "lodash.get@^4.4.2", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "deprecated": false, + "description": "The lodash method `_.get` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "get" + ], + "license": "MIT", + "name": "lodash.get", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.4.2" +} diff --git a/node_modules/lodash.set/LICENSE b/node_modules/lodash.set/LICENSE new file mode 100644 index 000000000..e0c69d560 --- /dev/null +++ b/node_modules/lodash.set/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.set/README.md b/node_modules/lodash.set/README.md new file mode 100644 index 000000000..1f530bc42 --- /dev/null +++ b/node_modules/lodash.set/README.md @@ -0,0 +1,18 @@ +# lodash.set v4.3.2 + +The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.set +``` + +In Node.js: +```js +var set = require('lodash.set'); +``` + +See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. diff --git a/node_modules/lodash.set/index.js b/node_modules/lodash.set/index.js new file mode 100644 index 000000000..9f3ed6b18 --- /dev/null +++ b/node_modules/lodash.set/index.js @@ -0,0 +1,990 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; diff --git a/node_modules/lodash.set/package.json b/node_modules/lodash.set/package.json new file mode 100644 index 000000000..8506899f1 --- /dev/null +++ b/node_modules/lodash.set/package.json @@ -0,0 +1,69 @@ +{ + "_from": "lodash.set@^4.3.2", + "_id": "lodash.set@4.3.2", + "_inBundle": false, + "_integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "_location": "/lodash.set", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lodash.set@^4.3.2", + "name": "lodash.set", + "escapedName": "lodash.set", + "rawSpec": "^4.3.2", + "saveSpec": null, + "fetchSpec": "^4.3.2" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "_shasum": "d8757b1da807dde24816b0d6a84bea1a76230b23", + "_spec": "lodash.set@^4.3.2", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "deprecated": false, + "description": "The lodash method `_.set` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "set" + ], + "license": "MIT", + "name": "lodash.set", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.3.2" +} diff --git a/node_modules/lodash.uniq/LICENSE b/node_modules/lodash.uniq/LICENSE new file mode 100644 index 000000000..e0c69d560 --- /dev/null +++ b/node_modules/lodash.uniq/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.uniq/README.md b/node_modules/lodash.uniq/README.md new file mode 100644 index 000000000..a662a5e38 --- /dev/null +++ b/node_modules/lodash.uniq/README.md @@ -0,0 +1,18 @@ +# lodash.uniq v4.5.0 + +The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.uniq +``` + +In Node.js: +```js +var uniq = require('lodash.uniq'); +``` + +See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.uniq) for more details. diff --git a/node_modules/lodash.uniq/index.js b/node_modules/lodash.uniq/index.js new file mode 100644 index 000000000..83fce2bc4 --- /dev/null +++ b/node_modules/lodash.uniq/index.js @@ -0,0 +1,896 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each + * element is kept. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ +function uniq(array) { + return (array && array.length) + ? baseUniq(array) + : []; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = uniq; diff --git a/node_modules/lodash.uniq/package.json b/node_modules/lodash.uniq/package.json new file mode 100644 index 000000000..707304d6c --- /dev/null +++ b/node_modules/lodash.uniq/package.json @@ -0,0 +1,69 @@ +{ + "_from": "lodash.uniq@^4.5.0", + "_id": "lodash.uniq@4.5.0", + "_inBundle": false, + "_integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "_location": "/lodash.uniq", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lodash.uniq@^4.5.0", + "name": "lodash.uniq", + "escapedName": "lodash.uniq", + "rawSpec": "^4.5.0", + "saveSpec": null, + "fetchSpec": "^4.5.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "_shasum": "d0225373aeb652adc1bc82e4945339a842754773", + "_spec": "lodash.uniq@^4.5.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "John-David Dalton", + "email": "john.david.dalton@gmail.com", + "url": "http://allyoucanleet.com/" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com", + "url": "https://github.com/phated" + }, + { + "name": "Mathias Bynens", + "email": "mathias@qiwi.be", + "url": "https://mathiasbynens.be/" + } + ], + "deprecated": false, + "description": "The lodash method `_.uniq` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "keywords": [ + "lodash-modularized", + "uniq" + ], + "license": "MIT", + "name": "lodash.uniq", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.5.0" +} diff --git a/node_modules/macos-release/index.d.ts b/node_modules/macos-release/index.d.ts new file mode 100644 index 000000000..c4efcf451 --- /dev/null +++ b/node_modules/macos-release/index.d.ts @@ -0,0 +1,36 @@ +declare const macosRelease: { + /** + Get the name and version of a macOS release from the Darwin version. + + @param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + + @example + ``` + import * as os from 'os'; + import macosRelease = require('macos-release'); + + // On a macOS Sierra system + + macosRelease(); + //=> {name: 'Sierra', version: '10.12'} + + os.release(); + //=> 13.2.0 + // This is the Darwin kernel version + + macosRelease(os.release()); + //=> {name: 'Sierra', version: '10.12'} + + macosRelease('14.0.0'); + //=> {name: 'Yosemite', version: '10.10'} + ``` + */ + (release?: string): string; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function macosRelease(release?: string): string; + // export = macosRelease; + default: typeof macosRelease; +}; + +export = macosRelease; diff --git a/node_modules/macos-release/index.js b/node_modules/macos-release/index.js new file mode 100644 index 000000000..b6eba6b02 --- /dev/null +++ b/node_modules/macos-release/index.js @@ -0,0 +1,32 @@ +'use strict'; +const os = require('os'); + +const nameMap = new Map([ + [19, 'Catalina'], + [18, 'Mojave'], + [17, 'High Sierra'], + [16, 'Sierra'], + [15, 'El Capitan'], + [14, 'Yosemite'], + [13, 'Mavericks'], + [12, 'Mountain Lion'], + [11, 'Lion'], + [10, 'Snow Leopard'], + [9, 'Leopard'], + [8, 'Tiger'], + [7, 'Panther'], + [6, 'Jaguar'], + [5, 'Puma'] +]); + +const macosRelease = release => { + release = Number((release || os.release()).split('.')[0]); + return { + name: nameMap.get(release), + version: '10.' + (release - 4) + }; +}; + +module.exports = macosRelease; +// TODO: remove this in the next major version +module.exports.default = macosRelease; diff --git a/node_modules/macos-release/license b/node_modules/macos-release/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/macos-release/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/macos-release/package.json b/node_modules/macos-release/package.json new file mode 100644 index 000000000..edd8be0ee --- /dev/null +++ b/node_modules/macos-release/package.json @@ -0,0 +1,71 @@ +{ + "_from": "macos-release@^2.2.0", + "_id": "macos-release@2.3.0", + "_inBundle": false, + "_integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", + "_location": "/macos-release", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "macos-release@^2.2.0", + "name": "macos-release", + "escapedName": "macos-release", + "rawSpec": "^2.2.0", + "saveSpec": null, + "fetchSpec": "^2.2.0" + }, + "_requiredBy": [ + "/os-name" + ], + "_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "_shasum": "eb1930b036c0800adebccd5f17bc4c12de8bb71f", + "_spec": "macos-release@^2.2.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\os-name", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/macos-release/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Get the name and version of a macOS release from the Darwin version", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/macos-release#readme", + "keywords": [ + "macos", + "os", + "darwin", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version" + ], + "license": "MIT", + "name": "macos-release", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/macos-release.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.3.0" +} diff --git a/node_modules/macos-release/readme.md b/node_modules/macos-release/readme.md new file mode 100644 index 000000000..2e7b9076b --- /dev/null +++ b/node_modules/macos-release/readme.md @@ -0,0 +1,57 @@ +# macos-release [![Build Status](https://travis-ci.org/sindresorhus/macos-release.svg?branch=master)](https://travis-ci.org/sindresorhus/macos-release) + +> Get the name and version of a macOS release from the Darwin version
+> Example: `13.2.0` → `{name: 'Mavericks', version: '10.9'}` + + +## Install + +``` +$ npm install macos-release +``` + + +## Usage + +```js +const os = require('os'); +const macosRelease = require('macos-release'); + +// On a macOS Sierra system + +macosRelease(); +//=> {name: 'Sierra', version: '10.12'} + +os.release(); +//=> 13.2.0 +// This is the Darwin kernel version + +macosRelease(os.release()); +//=> {name: 'Sierra', version: '10.12'} + +macosRelease('14.0.0'); +//=> {name: 'Yosemite', version: '10.10'} +``` + + +## API + +### macosRelease([release]) + +#### release + +Type: `string` + +By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](http://nodejs.org/api/os.html#os_os_release). + + +## Related + +- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system. Example: `macOS Sierra` +- [macos-version](https://github.com/sindresorhus/macos-version) - Get the macOS version of the current system. Example: `10.9.3` +- [win-release](https://github.com/sindresorhus/win-release) - Get the name of a Windows version from the release number: `5.1.2600` → `XP` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/nice-try/CHANGELOG.md b/node_modules/nice-try/CHANGELOG.md new file mode 100644 index 000000000..9e6baf2fb --- /dev/null +++ b/node_modules/nice-try/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.0.5] - 2018-08-25 + +### Changed + +- Removed `prepublish` script from `package.json` + +## [1.0.4] - 2017-08-08 + +### New + +- Added a changelog + +### Changed + +- Ignore `yarn.lock` and `package-lock.json` files \ No newline at end of file diff --git a/node_modules/nice-try/LICENSE b/node_modules/nice-try/LICENSE new file mode 100644 index 000000000..681c8f507 --- /dev/null +++ b/node_modules/nice-try/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Tobias Reich + +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/node_modules/nice-try/README.md b/node_modules/nice-try/README.md new file mode 100644 index 000000000..5b83b7882 --- /dev/null +++ b/node_modules/nice-try/README.md @@ -0,0 +1,32 @@ +# nice-try + +[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) + +A function that tries to execute a function and discards any error that occurs. + +## Install + +``` +npm install nice-try +``` + +## Usage + +```js +const niceTry = require('nice-try') + +niceTry(() => JSON.parse('true')) // true +niceTry(() => JSON.parse('truee')) // undefined +niceTry() // undefined +niceTry(true) // undefined +``` + +## API + +### Parameters + +- `fn` `{Function}` Function that might or might not throw an error. + +### Returns + +- `{?*}` Return-value of the function when no error occurred. \ No newline at end of file diff --git a/node_modules/nice-try/package.json b/node_modules/nice-try/package.json new file mode 100644 index 000000000..cc87eba7b --- /dev/null +++ b/node_modules/nice-try/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "nice-try@1.0.5", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "nice-try@1.0.5", + "_id": "nice-try@1.0.5", + "_inBundle": false, + "_integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "_location": "/nice-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "nice-try@1.0.5", + "name": "nice-try", + "escapedName": "nice-try", + "rawSpec": "1.0.5", + "saveSpec": null, + "fetchSpec": "1.0.5" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "_spec": "1.0.5", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "authors": [ + "Tobias Reich " + ], + "bugs": { + "url": "https://github.com/electerious/nice-try/issues" + }, + "description": "Tries to execute a function and discards any error that occurs", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.0", + "mocha": "^5.1.1", + "nyc": "^12.0.1" + }, + "files": [ + "src" + ], + "homepage": "https://github.com/electerious/nice-try", + "keywords": [ + "try", + "catch", + "error" + ], + "license": "MIT", + "main": "src/index.js", + "name": "nice-try", + "repository": { + "type": "git", + "url": "git+https://github.com/electerious/nice-try.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "nyc node_modules/mocha/bin/_mocha" + }, + "version": "1.0.5" +} diff --git a/node_modules/nice-try/src/index.js b/node_modules/nice-try/src/index.js new file mode 100644 index 000000000..837506f2c --- /dev/null +++ b/node_modules/nice-try/src/index.js @@ -0,0 +1,12 @@ +'use strict' + +/** + * Tries to execute a function and discards any error that occurs. + * @param {Function} fn - Function that might or might not throw an error. + * @returns {?*} Return-value of the function when no error occurred. + */ +module.exports = function(fn) { + + try { return fn() } catch (e) {} + +} \ No newline at end of file diff --git a/node_modules/node-fetch/CHANGELOG.md b/node_modules/node-fetch/CHANGELOG.md new file mode 100644 index 000000000..188fcd399 --- /dev/null +++ b/node_modules/node-fetch/CHANGELOG.md @@ -0,0 +1,266 @@ + +Changelog +========= + + +# 2.x release + +## v2.6.0 + +- Enhance: `options.agent`, it now accepts a function that returns custom http(s).Agent instance based on current URL, see readme for more information. +- Fix: incorrect `Content-Length` was returned for stream body in 2.5.0 release; note that `node-fetch` doesn't calculate content length for stream body. +- Fix: `Response.url` should return empty string instead of `null` by default. + +## v2.5.0 + +- Enhance: `Response` object now includes `redirected` property. +- Enhance: `fetch()` now accepts third-party `Blob` implementation as body. +- Other: disable `package-lock.json` generation as we never commit them. +- Other: dev dependency update. +- Other: readme update. + +## v2.4.1 + +- Fix: `Blob` import rule for node < 10, as `Readable` isn't a named export. + +## v2.4.0 + +- Enhance: added `Brotli` compression support (using node's zlib). +- Enhance: updated `Blob` implementation per spec. +- Fix: set content type automatically for `URLSearchParams`. +- Fix: `Headers` now reject empty header names. +- Fix: test cases, as node 12+ no longer accepts invalid header response. + +## v2.3.0 + +- Enhance: added `AbortSignal` support, with README example. +- Enhance: handle invalid `Location` header during redirect by rejecting them explicitly with `FetchError`. +- Fix: update `browser.js` to support react-native environment, where `self` isn't available globally. + +## v2.2.1 + +- Fix: `compress` flag shouldn't overwrite existing `Accept-Encoding` header. +- Fix: multiple `import` rules, where `PassThrough` etc. doesn't have a named export when using node <10 and `--exerimental-modules` flag. +- Other: Better README. + +## v2.2.0 + +- Enhance: Support all `ArrayBuffer` view types +- Enhance: Support Web Workers +- Enhance: Support Node.js' `--experimental-modules` mode; deprecate `.es.js` file +- Fix: Add `__esModule` property to the exports object +- Other: Better example in README for writing response to a file +- Other: More tests for Agent + +## v2.1.2 + +- Fix: allow `Body` methods to work on `ArrayBuffer`-backed `Body` objects +- Fix: reject promise returned by `Body` methods when the accumulated `Buffer` exceeds the maximum size +- Fix: support custom `Host` headers with any casing +- Fix: support importing `fetch()` from TypeScript in `browser.js` +- Fix: handle the redirect response body properly + +## v2.1.1 + +Fix packaging errors in v2.1.0. + +## v2.1.0 + +- Enhance: allow using ArrayBuffer as the `body` of a `fetch()` or `Request` +- Fix: store HTTP headers of a `Headers` object internally with the given case, for compatibility with older servers that incorrectly treated header names in a case-sensitive manner +- Fix: silently ignore invalid HTTP headers +- Fix: handle HTTP redirect responses without a `Location` header just like non-redirect responses +- Fix: include bodies when following a redirection when appropriate + +## v2.0.0 + +This is a major release. Check [our upgrade guide](https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md) for an overview on some key differences between v1 and v2. + +### General changes + +- Major: Node.js 0.10.x and 0.12.x support is dropped +- Major: `require('node-fetch/lib/response')` etc. is now unsupported; use `require('node-fetch').Response` or ES6 module imports +- Enhance: start testing on Node.js v4.x, v6.x, v8.x LTS, as well as v9.x stable +- Enhance: use Rollup to produce a distributed bundle (less memory overhead and faster startup) +- Enhance: make `Object.prototype.toString()` on Headers, Requests, and Responses return correct class strings +- Other: rewrite in ES2015 using Babel +- Other: use Codecov for code coverage tracking +- Other: update package.json script for npm 5 +- Other: `encoding` module is now optional (alpha.7) +- Other: expose browser.js through package.json, avoid bundling mishaps (alpha.9) +- Other: allow TypeScript to `import` node-fetch by exposing default (alpha.9) + +### HTTP requests + +- Major: overwrite user's `Content-Length` if we can be sure our information is correct (per spec) +- Fix: errors in a response are caught before the body is accessed +- Fix: support WHATWG URL objects, created by `whatwg-url` package or `require('url').URL` in Node.js 7+ + +### Response and Request classes + +- Major: `response.text()` no longer attempts to detect encoding, instead always opting for UTF-8 (per spec); use `response.textConverted()` for the v1 behavior +- Major: make `response.json()` throw error instead of returning an empty object on 204 no-content respose (per spec; reverts behavior changed in v1.6.2) +- Major: internal methods are no longer exposed +- Major: throw error when a `GET` or `HEAD` Request is constructed with a non-null body (per spec) +- Enhance: add `response.arrayBuffer()` (also applies to Requests) +- Enhance: add experimental `response.blob()` (also applies to Requests) +- Enhance: `URLSearchParams` is now accepted as a body +- Enhance: wrap `response.json()` json parsing error as `FetchError` +- Fix: fix Request and Response with `null` body + +### Headers class + +- Major: remove `headers.getAll()`; make `get()` return all headers delimited by commas (per spec) +- Enhance: make Headers iterable +- Enhance: make Headers constructor accept an array of tuples +- Enhance: make sure header names and values are valid in HTTP +- Fix: coerce Headers prototype function parameters to strings, where applicable + +### Documentation + +- Enhance: more comprehensive API docs +- Enhance: add a list of default headers in README + + +# 1.x release + +## backport releases (v1.7.0 and beyond) + +See [changelog on 1.x branch](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) for details. + +## v1.6.3 + +- Enhance: error handling document to explain `FetchError` design +- Fix: support `form-data` 2.x releases (requires `form-data` >= 2.1.0) + +## v1.6.2 + +- Enhance: minor document update +- Fix: response.json() returns empty object on 204 no-content response instead of throwing a syntax error + +## v1.6.1 + +- Fix: if `res.body` is a non-stream non-formdata object, we will call `body.toString` and send it as a string +- Fix: `counter` value is incorrectly set to `follow` value when wrapping Request instance +- Fix: documentation update + +## v1.6.0 + +- Enhance: added `res.buffer()` api for convenience, it returns body as a Node.js buffer +- Enhance: better old server support by handling raw deflate response +- Enhance: skip encoding detection for non-HTML/XML response +- Enhance: minor document update +- Fix: HEAD request doesn't need decompression, as body is empty +- Fix: `req.body` now accepts a Node.js buffer + +## v1.5.3 + +- Fix: handle 204 and 304 responses when body is empty but content-encoding is gzip/deflate +- Fix: allow resolving response and cloned response in any order +- Fix: avoid setting `content-length` when `form-data` body use streams +- Fix: send DELETE request with content-length when body is present +- Fix: allow any url when calling new Request, but still reject non-http(s) url in fetch + +## v1.5.2 + +- Fix: allow node.js core to handle keep-alive connection pool when passing a custom agent + +## v1.5.1 + +- Fix: redirect mode `manual` should work even when there is no redirection or broken redirection + +## v1.5.0 + +- Enhance: rejected promise now use custom `Error` (thx to @pekeler) +- Enhance: `FetchError` contains `err.type` and `err.code`, allows for better error handling (thx to @pekeler) +- Enhance: basic support for redirect mode `manual` and `error`, allows for location header extraction (thx to @jimmywarting for the initial PR) + +## v1.4.1 + +- Fix: wrapping Request instance with FormData body again should preserve the body as-is + +## v1.4.0 + +- Enhance: Request and Response now have `clone` method (thx to @kirill-konshin for the initial PR) +- Enhance: Request and Response now have proper string and buffer body support (thx to @kirill-konshin) +- Enhance: Body constructor has been refactored out (thx to @kirill-konshin) +- Enhance: Headers now has `forEach` method (thx to @tricoder42) +- Enhance: back to 100% code coverage +- Fix: better form-data support (thx to @item4) +- Fix: better character encoding detection under chunked encoding (thx to @dsuket for the initial PR) + +## v1.3.3 + +- Fix: make sure `Content-Length` header is set when body is string for POST/PUT/PATCH requests +- Fix: handle body stream error, for cases such as incorrect `Content-Encoding` header +- Fix: when following certain redirects, use `GET` on subsequent request per Fetch Spec +- Fix: `Request` and `Response` constructors now parse headers input using `Headers` + +## v1.3.2 + +- Enhance: allow auto detect of form-data input (no `FormData` spec on node.js, this is form-data specific feature) + +## v1.3.1 + +- Enhance: allow custom host header to be set (server-side only feature, as it's a forbidden header on client-side) + +## v1.3.0 + +- Enhance: now `fetch.Request` is exposed as well + +## v1.2.1 + +- Enhance: `Headers` now normalized `Number` value to `String`, prevent common mistakes + +## v1.2.0 + +- Enhance: now fetch.Headers and fetch.Response are exposed, making testing easier + +## v1.1.2 + +- Fix: `Headers` should only support `String` and `Array` properties, and ignore others + +## v1.1.1 + +- Enhance: now req.headers accept both plain object and `Headers` instance + +## v1.1.0 + +- Enhance: timeout now also applies to response body (in case of slow response) +- Fix: timeout is now cleared properly when fetch is done/has failed + +## v1.0.6 + +- Fix: less greedy content-type charset matching + +## v1.0.5 + +- Fix: when `follow = 0`, fetch should not follow redirect +- Enhance: update tests for better coverage +- Enhance: code formatting +- Enhance: clean up doc + +## v1.0.4 + +- Enhance: test iojs support +- Enhance: timeout attached to socket event only fire once per redirect + +## v1.0.3 + +- Fix: response size limit should reject large chunk +- Enhance: added character encoding detection for xml, such as rss/atom feed (encoding in DTD) + +## v1.0.2 + +- Fix: added res.ok per spec change + +## v1.0.0 + +- Enhance: better test coverage and doc + + +# 0.x release + +## v0.1 + +- Major: initial public release diff --git a/node_modules/node-fetch/LICENSE.md b/node_modules/node-fetch/LICENSE.md new file mode 100644 index 000000000..660ffecb5 --- /dev/null +++ b/node_modules/node-fetch/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 David Frank + +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/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md new file mode 100644 index 000000000..cb1990120 --- /dev/null +++ b/node_modules/node-fetch/README.md @@ -0,0 +1,583 @@ +node-fetch +========== + +[![npm version][npm-image]][npm-url] +[![build status][travis-image]][travis-url] +[![coverage status][codecov-image]][codecov-url] +[![install size][install-size-image]][install-size-url] + +A light-weight module that brings `window.fetch` to Node.js + +(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567)) + + + +- [Motivation](#motivation) +- [Features](#features) +- [Difference from client-side fetch](#difference-from-client-side-fetch) +- [Installation](#installation) +- [Loading and configuring the module](#loading-and-configuring-the-module) +- [Common Usage](#common-usage) + - [Plain text or HTML](#plain-text-or-html) + - [JSON](#json) + - [Simple Post](#simple-post) + - [Post with JSON](#post-with-json) + - [Post with form parameters](#post-with-form-parameters) + - [Handling exceptions](#handling-exceptions) + - [Handling client and server errors](#handling-client-and-server-errors) +- [Advanced Usage](#advanced-usage) + - [Streams](#streams) + - [Buffer](#buffer) + - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data) + - [Extract Set-Cookie Header](#extract-set-cookie-header) + - [Post data using a file stream](#post-data-using-a-file-stream) + - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart) + - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal) +- [API](#api) + - [fetch(url[, options])](#fetchurl-options) + - [Options](#options) + - [Class: Request](#class-request) + - [Class: Response](#class-response) + - [Class: Headers](#class-headers) + - [Interface: Body](#interface-body) + - [Class: FetchError](#class-fetcherror) +- [License](#license) +- [Acknowledgement](#acknowledgement) + + + +## Motivation + +Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. + +See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side). + +## Features + +- Stay consistent with `window.fetch` API. +- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences. +- Use native promise, but allow substituting it with [insert your favorite promise library]. +- Use native Node streams for body, on both request and response. +- Decode content encoding (gzip/deflate) properly, and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. +- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting. + +## Difference from client-side fetch + +- See [Known Differences](LIMITS.md) for details. +- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue. +- Pull requests are welcomed too! + +## Installation + +Current stable release (`2.x`) + +```sh +$ npm install node-fetch --save +``` + +## Loading and configuring the module +We suggest you load the module via `require`, pending the stabalizing of es modules in node: +```js +const fetch = require('node-fetch'); +``` + +If you are using a Promise library other than native, set it through fetch.Promise: +```js +const Bluebird = require('bluebird'); + +fetch.Promise = Bluebird; +``` + +## Common Usage + +NOTE: The documentation below is up-to-date with `2.x` releases, [see `1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. + +#### Plain text or HTML +```js +fetch('https://github.com/') + .then(res => res.text()) + .then(body => console.log(body)); +``` + +#### JSON + +```js + +fetch('https://api.github.com/users/github') + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Simple Post +```js +fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' }) + .then(res => res.json()) // expecting a json response + .then(json => console.log(json)); +``` + +#### Post with JSON + +```js +const body = { a: 1 }; + +fetch('https://httpbin.org/post', { + method: 'post', + body: JSON.stringify(body), + headers: { 'Content-Type': 'application/json' }, + }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form parameters +`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods. + +NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such: + +```js +const { URLSearchParams } = require('url'); + +const params = new URLSearchParams(); +params.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: params }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Handling exceptions +NOTE: 3xx-5xx responses are *NOT* exceptions, and should be handled in `then()`, see the next section. + +Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, like network errors, and operational errors which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. + +```js +fetch('https://domain.invalid/') + .catch(err => console.error(err)); +``` + +#### Handling client and server errors +It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses: + +```js +function checkStatus(res) { + if (res.ok) { // res.status >= 200 && res.status < 300 + return res; + } else { + throw MyCustomError(res.statusText); + } +} + +fetch('https://httpbin.org/status/400') + .then(checkStatus) + .then(res => console.log('will not get here...')) +``` + +## Advanced Usage + +#### Streams +The "Node.js way" is to use streams when possible: + +```js +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => { + const dest = fs.createWriteStream('./octocat.png'); + res.body.pipe(dest); + }); +``` + +#### Buffer +If you prefer to cache binary data in full, use buffer(). (NOTE: buffer() is a `node-fetch` only API) + +```js +const fileType = require('file-type'); + +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => res.buffer()) + .then(buffer => fileType(buffer)) + .then(type => { /* ... */ }); +``` + +#### Accessing Headers and other Meta data +```js +fetch('https://github.com/') + .then(res => { + console.log(res.ok); + console.log(res.status); + console.log(res.statusText); + console.log(res.headers.raw()); + console.log(res.headers.get('content-type')); + }); +``` + +#### Extract Set-Cookie Header + +Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`, this is a `node-fetch` only API. + +```js +fetch(url).then(res => { + // returns an array of values, instead of a string of comma-separated values + console.log(res.headers.raw()['set-cookie']); +}); +``` + +#### Post data using a file stream + +```js +const { createReadStream } = require('fs'); + +const stream = createReadStream('input.txt'); + +fetch('https://httpbin.org/post', { method: 'POST', body: stream }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form-data (detect multipart) + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: form }) + .then(res => res.json()) + .then(json => console.log(json)); + +// OR, using custom headers +// NOTE: getHeaders() is non-standard API + +const form = new FormData(); +form.append('a', 1); + +const options = { + method: 'POST', + body: form, + headers: form.getHeaders() +} + +fetch('https://httpbin.org/post', options) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Request cancellation with AbortSignal + +> NOTE: You may only cancel streamed requests on Node >= v8.0.0 + +You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller). + +An example of timing out a request after 150ms could be achieved as follows: + +```js +import AbortController from 'abort-controller'; + +const controller = new AbortController(); +const timeout = setTimeout( + () => { controller.abort(); }, + 150, +); + +fetch(url, { signal: controller.signal }) + .then(res => res.json()) + .then( + data => { + useData(data) + }, + err => { + if (err.name === 'AbortError') { + // request was aborted + } + }, + ) + .finally(() => { + clearTimeout(timeout); + }); +``` + +See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples. + + +## API + +### fetch(url[, options]) + +- `url` A string representing the URL for fetching +- `options` [Options](#fetch-options) for the HTTP(S) request +- Returns: Promise<[Response](#class-response)> + +Perform an HTTP(S) fetch. + +`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected promise. + + +### Options + +The default values are shown after each option key. + +```js +{ + // These properties are part of the Fetch Standard + method: 'GET', + headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below) + body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream + redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect + signal: null, // pass an instance of AbortSignal to optionally abort requests + + // The following properties are node-fetch extensions + follow: 20, // maximum redirect count. 0 to not follow redirect + timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead. + compress: true, // support gzip/deflate content encoding. false to disable + size: 0, // maximum response body size in bytes. 0 to disable + agent: null // http(s).Agent instance or function that returns an instance (see below) +} +``` + +##### Default Headers + +If no values are set, the following request headers will be sent automatically: + +Header | Value +------------------- | -------------------------------------------------------- +`Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_ +`Accept` | `*/*` +`Connection` | `close` _(when no `options.agent` is present)_ +`Content-Length` | _(automatically calculated, if possible)_ +`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_ +`User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)` + +Note: when `body` is a `Stream`, `Content-Length` is not set automatically. + +##### Custom Agent + +The `agent` option allows you to specify networking related options that's out of the scope of Fetch. Including and not limit to: + +- Support self-signed certificate +- Use only IPv4 or IPv6 +- Custom DNS Lookup + +See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information. + +In addition, `agent` option accepts a function that returns http(s).Agent instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. + +```js +const httpAgent = new http.Agent({ + keepAlive: true +}); +const httpsAgent = new https.Agent({ + keepAlive: true +}); + +const options = { + agent: function (_parsedURL) { + if (_parsedURL.protocol == 'http:') { + return httpAgent; + } else { + return httpsAgent; + } + } +} +``` + + +### Class: Request + +An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface. + +Due to the nature of Node.js, the following properties are not implemented at this moment: + +- `type` +- `destination` +- `referrer` +- `referrerPolicy` +- `mode` +- `credentials` +- `cache` +- `integrity` +- `keepalive` + +The following node-fetch extension properties are provided: + +- `follow` +- `compress` +- `counter` +- `agent` + +See [options](#fetch-options) for exact meaning of these extensions. + +#### new Request(input[, options]) + +*(spec-compliant)* + +- `input` A string representing a URL, or another `Request` (which will be cloned) +- `options` [Options][#fetch-options] for the HTTP(S) request + +Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + +In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object. + + +### Class: Response + +An HTTP(S) response. This class implements the [Body](#iface-body) interface. + +The following properties are not implemented in node-fetch at this moment: + +- `Response.error()` +- `Response.redirect()` +- `type` +- `trailer` + +#### new Response([body[, options]]) + +*(spec-compliant)* + +- `body` A string or [Readable stream][node-readable] +- `options` A [`ResponseInit`][response-init] options dictionary + +Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response). + +Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly. + +#### response.ok + +*(spec-compliant)* + +Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300. + +#### response.redirected + +*(spec-compliant)* + +Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0. + + +### Class: Headers + +This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented. + +#### new Headers([init]) + +*(spec-compliant)* + +- `init` Optional argument to pre-fill the `Headers` object + +Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object, or any iterable object. + +```js +// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class + +const meta = { + 'Content-Type': 'text/xml', + 'Breaking-Bad': '<3' +}; +const headers = new Headers(meta); + +// The above is equivalent to +const meta = [ + [ 'Content-Type', 'text/xml' ], + [ 'Breaking-Bad', '<3' ] +]; +const headers = new Headers(meta); + +// You can in fact use any iterable objects, like a Map or even another Headers +const meta = new Map(); +meta.set('Content-Type', 'text/xml'); +meta.set('Breaking-Bad', '<3'); +const headers = new Headers(meta); +const copyOfHeaders = new Headers(headers); +``` + + +### Interface: Body + +`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes. + +The following methods are not yet implemented in node-fetch at this moment: + +- `formData()` + +#### body.body + +*(deviation from spec)* + +* Node.js [`Readable` stream][node-readable] + +The data encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. + +#### body.bodyUsed + +*(spec-compliant)* + +* `Boolean` + +A boolean property for if this body has been consumed. Per spec, a consumed body cannot be used again. + +#### body.arrayBuffer() +#### body.blob() +#### body.json() +#### body.text() + +*(spec-compliant)* + +* Returns: Promise + +Consume the body and return a promise that will resolve to one of these formats. + +#### body.buffer() + +*(node-fetch extension)* + +* Returns: Promise<Buffer> + +Consume the body and return a promise that will resolve to a Buffer. + +#### body.textConverted() + +*(node-fetch extension)* + +* Returns: Promise<String> + +Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8, if possible. + +(This API requires an optional dependency on npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) + + +### Class: FetchError + +*(node-fetch extension)* + +An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info. + + +### Class: AbortError + +*(node-fetch extension)* + +An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info. + +## Acknowledgement + +Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference. + +`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr). + +## License + +MIT + +[npm-image]: https://flat.badgen.net/npm/v/node-fetch +[npm-url]: https://www.npmjs.com/package/node-fetch +[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch +[travis-url]: https://travis-ci.org/bitinn/node-fetch +[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master +[codecov-url]: https://codecov.io/gh/bitinn/node-fetch +[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch +[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch +[whatwg-fetch]: https://fetch.spec.whatwg.org/ +[response-init]: https://fetch.spec.whatwg.org/#responseinit +[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams +[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers +[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md +[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md +[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js new file mode 100644 index 000000000..0ad5de004 --- /dev/null +++ b/node_modules/node-fetch/browser.js @@ -0,0 +1,23 @@ +"use strict"; + +// ref: https://github.com/tc39/proposal-global +var getGlobal = function () { + // the only reliable means to get the global object is + // `Function('return this')()` + // However, this causes CSP violations in Chrome apps. + if (typeof self !== 'undefined') { return self; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + throw new Error('unable to locate global object'); +} + +var global = getGlobal(); + +module.exports = exports = global.fetch; + +// Needed for TypeScript and Webpack. +exports.default = global.fetch.bind(global); + +exports.Headers = global.Headers; +exports.Request = global.Request; +exports.Response = global.Response; \ No newline at end of file diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js new file mode 100644 index 000000000..37d022c91 --- /dev/null +++ b/node_modules/node-fetch/lib/index.es.js @@ -0,0 +1,1633 @@ +process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); + +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js new file mode 100644 index 000000000..daa44bcaf --- /dev/null +++ b/node_modules/node-fetch/lib/index.js @@ -0,0 +1,1642 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(require('stream')); +var http = _interopDefault(require('http')); +var Url = _interopDefault(require('url')); +var https = _interopDefault(require('https')); +var zlib = _interopDefault(require('zlib')); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs new file mode 100644 index 000000000..e571ea696 --- /dev/null +++ b/node_modules/node-fetch/lib/index.mjs @@ -0,0 +1,1631 @@ +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parse_url(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; +const resolve_url = Url.resolve; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + const locationURL = location === null ? null : resolve_url(request.url, location); + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout + }; + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json new file mode 100644 index 000000000..9aebe2b78 --- /dev/null +++ b/node_modules/node-fetch/package.json @@ -0,0 +1,93 @@ +{ + "_from": "node-fetch@^2.3.0", + "_id": "node-fetch@2.6.0", + "_inBundle": false, + "_integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "_location": "/node-fetch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "node-fetch@^2.3.0", + "name": "node-fetch", + "escapedName": "node-fetch", + "rawSpec": "^2.3.0", + "saveSpec": null, + "fetchSpec": "^2.3.0" + }, + "_requiredBy": [ + "/@octokit/request" + ], + "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "_shasum": "e633456386d4aa55863f676a7ab0daa8fdecb0fd", + "_spec": "node-fetch@^2.3.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request", + "author": { + "name": "David Frank" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/bitinn/node-fetch/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "A light-weight module that brings window.fetch to node.js", + "devDependencies": { + "@ungap/url-search-params": "^0.1.2", + "abort-controller": "^1.1.0", + "abortcontroller-polyfill": "^1.3.0", + "babel-core": "^6.26.3", + "babel-plugin-istanbul": "^4.1.6", + "babel-preset-env": "^1.6.1", + "babel-register": "^6.16.3", + "chai": "^3.5.0", + "chai-as-promised": "^7.1.1", + "chai-iterator": "^1.1.1", + "chai-string": "~1.3.0", + "codecov": "^3.3.0", + "cross-env": "^5.2.0", + "form-data": "^2.3.3", + "is-builtin-module": "^1.0.0", + "mocha": "^5.0.0", + "nyc": "11.9.0", + "parted": "^0.1.1", + "promise": "^8.0.3", + "resumer": "0.0.0", + "rollup": "^0.63.4", + "rollup-plugin-babel": "^3.0.7", + "string-to-arraybuffer": "^1.0.2", + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "files": [ + "lib/index.js", + "lib/index.mjs", + "lib/index.es.js", + "browser.js" + ], + "homepage": "https://github.com/bitinn/node-fetch", + "keywords": [ + "fetch", + "http", + "promise" + ], + "license": "MIT", + "main": "lib/index", + "module": "lib/index.mjs", + "name": "node-fetch", + "repository": { + "type": "git", + "url": "git+https://github.com/bitinn/node-fetch.git" + }, + "scripts": { + "build": "cross-env BABEL_ENV=rollup rollup -c", + "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json", + "prepare": "npm run build", + "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", + "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js" + }, + "version": "2.6.0" +} diff --git a/node_modules/npm-run-path/index.js b/node_modules/npm-run-path/index.js new file mode 100644 index 000000000..56f31e471 --- /dev/null +++ b/node_modules/npm-run-path/index.js @@ -0,0 +1,39 @@ +'use strict'; +const path = require('path'); +const pathKey = require('path-key'); + +module.exports = opts => { + opts = Object.assign({ + cwd: process.cwd(), + path: process.env[pathKey()] + }, opts); + + let prev; + let pth = path.resolve(opts.cwd); + const ret = []; + + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } + + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); + + return ret.concat(opts.path).join(path.delimiter); +}; + +module.exports.env = opts => { + opts = Object.assign({ + env: process.env + }, opts); + + const env = Object.assign({}, opts.env); + const path = pathKey({env}); + + opts.path = env[path]; + env[path] = module.exports(opts); + + return env; +}; diff --git a/node_modules/npm-run-path/license b/node_modules/npm-run-path/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/npm-run-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/npm-run-path/package.json b/node_modules/npm-run-path/package.json new file mode 100644 index 000000000..78e71b451 --- /dev/null +++ b/node_modules/npm-run-path/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + "npm-run-path@2.0.2", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "npm-run-path@2.0.2", + "_id": "npm-run-path@2.0.2", + "_inBundle": false, + "_integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "_location": "/npm-run-path", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "npm-run-path@2.0.2", + "name": "npm-run-path", + "escapedName": "npm-run-path", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/npm-run-path/issues" + }, + "dependencies": { + "path-key": "^2.0.0" + }, + "description": "Get your PATH prepended with locally installed binaries", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/npm-run-path#readme", + "keywords": [ + "npm", + "run", + "path", + "package", + "bin", + "binary", + "binaries", + "script", + "cli", + "command-line", + "execute", + "executable" + ], + "license": "MIT", + "name": "npm-run-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/npm-run-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.2", + "xo": { + "esnext": true + } +} diff --git a/node_modules/npm-run-path/readme.md b/node_modules/npm-run-path/readme.md new file mode 100644 index 000000000..4ff4722a6 --- /dev/null +++ b/node_modules/npm-run-path/readme.md @@ -0,0 +1,81 @@ +# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path) + +> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries + +In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm. + + +## Install + +``` +$ npm install --save npm-run-path +``` + + +## Usage + +```js +const childProcess = require('child_process'); +const npmRunPath = require('npm-run-path'); + +console.log(process.env.PATH); +//=> '/usr/local/bin' + +console.log(npmRunPath()); +//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' + +// `foo` is a locally installed binary +childProcess.execFileSync('foo', { + env: npmRunPath.env() +}); +``` + + +## API + +### npmRunPath([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### path + +Type: `string`
+Default: [`PATH`](https://github.com/sindresorhus/path-key) + +PATH to be appended.
+Set it to an empty string to exclude the default PATH. + +### npmRunPath.env([options]) + +#### options + +##### cwd + +Type: `string`
+Default: `process.cwd()` + +Working directory. + +##### env + +Type: `Object` + +Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options. + + +## Related + +- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module +- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/octokit-pagination-methods/.travis.yml b/node_modules/octokit-pagination-methods/.travis.yml new file mode 100644 index 000000000..7241e463b --- /dev/null +++ b/node_modules/octokit-pagination-methods/.travis.yml @@ -0,0 +1,36 @@ +language: node_js +cache: + directories: + - ~/.npm + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +branches: + except: + - /^v\d+\.\d+\.\d+$/ + +jobs: + include: + - stage: test + node_js: 6 + - node_js: 8 + install: npm ci + - node_js: 10 + install: npm ci + - node_js: lts/* + script: npm run coverage:upload + - stage: release + env: semantic-release + node_js: lts/* + install: npm ci + script: npm run semantic-release + +stages: + - test + - name: release + if: branch = master AND type IN (push) diff --git a/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md b/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..8124607bc --- /dev/null +++ b/node_modules/octokit-pagination-methods/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource+octokit@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/node_modules/octokit-pagination-methods/LICENSE b/node_modules/octokit-pagination-methods/LICENSE new file mode 100644 index 000000000..4c0d268a2 --- /dev/null +++ b/node_modules/octokit-pagination-methods/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) +Copyright (c) 2017-2018 Octokit 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/node_modules/octokit-pagination-methods/README.md b/node_modules/octokit-pagination-methods/README.md new file mode 100644 index 000000000..0dd63416e --- /dev/null +++ b/node_modules/octokit-pagination-methods/README.md @@ -0,0 +1,42 @@ +# octokit-pagination-methods + +> Legacy Octokit pagination methods from v15 + +[![Build Status](https://travis-ci.com/gr2m/octokit-pagination-methods.svg?branch=master)](https://travis-ci.com/gr2m/octokit-pagination-methods) +[![Coverage Status](https://coveralls.io/repos/gr2m/octokit-pagination-methods/badge.svg?branch=master)](https://coveralls.io/github/gr2m/octokit-pagination-methods?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/octokit-pagination-methods.svg)](https://greenkeeper.io/) + +Several pagination methods such as `octokit.hasNextPage()` and `octokit.getNextPage()` have been removed from `@octokit/request` in v16.0.0 in favor of `octokit.paginate()`. This plugin brings back the methods to ease the upgrade to v16. + +## Usage + +```js +const Octokit = require('@octokit/rest') + .plugin('octokit-pagination-methods') +const octokit = new Octokit() + +octokit.issues.getForRepo() + + .then(async response => { + // returns true/false + octokit.hasNextPage(response) + octokit.hasPreviousPage(response) + octokit.hasFirstPage(response) + octokit.hasLastPage(response) + + // fetch other pages + const nextPage = await octokit.getNextPage(response) + const previousPage = await octokit.getPreviousPage(response) + const firstPage = await octokit.getFirstPage(response) + const lastPage = await octokit.getLastPage(response) + }) +``` + +## Credit + +These methods have originally been created for `node-github` by [@mikedeboer](https://github.com/mikedeboer) +while working at Cloud9 IDE, Inc. It was adopted and renamed by GitHub in 2017. + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/octokit-pagination-methods/index.js b/node_modules/octokit-pagination-methods/index.js new file mode 100644 index 000000000..f7474a72e --- /dev/null +++ b/node_modules/octokit-pagination-methods/index.js @@ -0,0 +1,12 @@ +module.exports = paginationMethodsPlugin + +function paginationMethodsPlugin (octokit) { + octokit.getFirstPage = require('./lib/get-first-page').bind(null, octokit) + octokit.getLastPage = require('./lib/get-last-page').bind(null, octokit) + octokit.getNextPage = require('./lib/get-next-page').bind(null, octokit) + octokit.getPreviousPage = require('./lib/get-previous-page').bind(null, octokit) + octokit.hasFirstPage = require('./lib/has-first-page') + octokit.hasLastPage = require('./lib/has-last-page') + octokit.hasNextPage = require('./lib/has-next-page') + octokit.hasPreviousPage = require('./lib/has-previous-page') +} diff --git a/node_modules/octokit-pagination-methods/lib/deprecate.js b/node_modules/octokit-pagination-methods/lib/deprecate.js new file mode 100644 index 000000000..c56f7ab67 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/deprecate.js @@ -0,0 +1,12 @@ +module.exports = deprecate + +const loggedMessages = {} + +function deprecate (message) { + if (loggedMessages[message]) { + return + } + + console.warn(`DEPRECATED (@octokit/rest): ${message}`) + loggedMessages[message] = 1 +} diff --git a/node_modules/octokit-pagination-methods/lib/get-first-page.js b/node_modules/octokit-pagination-methods/lib/get-first-page.js new file mode 100644 index 000000000..5f2dff9e9 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-first-page.js @@ -0,0 +1,7 @@ +module.exports = getFirstPage + +const getPage = require('./get-page') + +function getFirstPage (octokit, link, headers) { + return getPage(octokit, link, 'first', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-last-page.js b/node_modules/octokit-pagination-methods/lib/get-last-page.js new file mode 100644 index 000000000..9f8624625 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-last-page.js @@ -0,0 +1,7 @@ +module.exports = getLastPage + +const getPage = require('./get-page') + +function getLastPage (octokit, link, headers) { + return getPage(octokit, link, 'last', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-next-page.js b/node_modules/octokit-pagination-methods/lib/get-next-page.js new file mode 100644 index 000000000..fbd5e94e3 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-next-page.js @@ -0,0 +1,7 @@ +module.exports = getNextPage + +const getPage = require('./get-page') + +function getNextPage (octokit, link, headers) { + return getPage(octokit, link, 'next', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/get-page-links.js b/node_modules/octokit-pagination-methods/lib/get-page-links.js new file mode 100644 index 000000000..585eadbeb --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-page-links.js @@ -0,0 +1,15 @@ +module.exports = getPageLinks + +function getPageLinks (link) { + link = link.link || link.headers.link || '' + + const links = {} + + // link format: + // '; rel="next", ; rel="last"' + link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { + links[type] = uri + }) + + return links +} diff --git a/node_modules/octokit-pagination-methods/lib/get-page.js b/node_modules/octokit-pagination-methods/lib/get-page.js new file mode 100644 index 000000000..d60fe734a --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-page.js @@ -0,0 +1,38 @@ +module.exports = getPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') +const HttpError = require('./http-error') + +function getPage (octokit, link, which, headers) { + deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + const url = getPageLinks(link)[which] + + if (!url) { + const urlError = new HttpError(`No ${which} page found`, 404) + return Promise.reject(urlError) + } + + const requestOptions = { + url, + headers: applyAcceptHeader(link, headers) + } + + const promise = octokit.request(requestOptions) + + return promise +} + +function applyAcceptHeader (res, headers) { + const previous = res.headers && res.headers['x-github-media-type'] + + if (!previous || (headers && headers.accept)) { + return headers + } + headers = headers || {} + headers.accept = 'application/vnd.' + previous + .replace('; param=', '.') + .replace('; format=', '+') + + return headers +} diff --git a/node_modules/octokit-pagination-methods/lib/get-previous-page.js b/node_modules/octokit-pagination-methods/lib/get-previous-page.js new file mode 100644 index 000000000..0477eeb8a --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/get-previous-page.js @@ -0,0 +1,7 @@ +module.exports = getPreviousPage + +const getPage = require('./get-page') + +function getPreviousPage (octokit, link, headers) { + return getPage(octokit, link, 'prev', headers) +} diff --git a/node_modules/octokit-pagination-methods/lib/has-first-page.js b/node_modules/octokit-pagination-methods/lib/has-first-page.js new file mode 100644 index 000000000..3814b1f68 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-first-page.js @@ -0,0 +1,9 @@ +module.exports = hasFirstPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasFirstPage (link) { + deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).first +} diff --git a/node_modules/octokit-pagination-methods/lib/has-last-page.js b/node_modules/octokit-pagination-methods/lib/has-last-page.js new file mode 100644 index 000000000..10c12e357 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-last-page.js @@ -0,0 +1,9 @@ +module.exports = hasLastPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasLastPage (link) { + deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).last +} diff --git a/node_modules/octokit-pagination-methods/lib/has-next-page.js b/node_modules/octokit-pagination-methods/lib/has-next-page.js new file mode 100644 index 000000000..1015ccd72 --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-next-page.js @@ -0,0 +1,9 @@ +module.exports = hasNextPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasNextPage (link) { + deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).next +} diff --git a/node_modules/octokit-pagination-methods/lib/has-previous-page.js b/node_modules/octokit-pagination-methods/lib/has-previous-page.js new file mode 100644 index 000000000..49e09260b --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/has-previous-page.js @@ -0,0 +1,9 @@ +module.exports = hasPreviousPage + +const deprecate = require('./deprecate') +const getPageLinks = require('./get-page-links') + +function hasPreviousPage (link) { + deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) + return getPageLinks(link).prev +} diff --git a/node_modules/octokit-pagination-methods/lib/http-error.js b/node_modules/octokit-pagination-methods/lib/http-error.js new file mode 100644 index 000000000..8eb9f2f6c --- /dev/null +++ b/node_modules/octokit-pagination-methods/lib/http-error.js @@ -0,0 +1,15 @@ +module.exports = class HttpError extends Error { + constructor (message, code, headers) { + 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.code = code + this.headers = headers + } +} diff --git a/node_modules/octokit-pagination-methods/package.json b/node_modules/octokit-pagination-methods/package.json new file mode 100644 index 000000000..0ce1ac382 --- /dev/null +++ b/node_modules/octokit-pagination-methods/package.json @@ -0,0 +1,76 @@ +{ + "_from": "octokit-pagination-methods@^1.1.0", + "_id": "octokit-pagination-methods@1.1.0", + "_inBundle": false, + "_integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "_location": "/octokit-pagination-methods", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "octokit-pagination-methods@^1.1.0", + "name": "octokit-pagination-methods", + "escapedName": "octokit-pagination-methods", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "_shasum": "cf472edc9d551055f9ef73f6e42b4dbb4c80bea4", + "_spec": "octokit-pagination-methods@^1.1.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\rest", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "bugs": { + "url": "https://github.com/gr2m/octokit-pagination-methods/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Legacy Octokit pagination methods from v15", + "devDependencies": { + "@octokit/rest": "github:octokit/rest.js#next", + "coveralls": "^3.0.2", + "nock": "^10.0.2", + "semantic-release": "^15.10.8", + "simple-mock": "^0.8.0", + "standard": "^12.0.1", + "standard-markdown": "^5.0.1", + "tap": "^12.0.1" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/gr2m/octokit-pagination-methods#readme", + "keywords": [ + "octokit", + "github", + "api", + "rest", + "plugin" + ], + "license": "MIT", + "main": "index.js", + "name": "octokit-pagination-methods", + "publishConfig": { + "access": "public", + "tag": "latest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/octokit-pagination-methods.git" + }, + "scripts": { + "coverage": "tap --coverage-report=html", + "coverage:upload": "npm run test && tap --coverage-report=text-lcov | coveralls", + "pretest": "standard && standard-markdown *.md", + "semantic-release": "semantic-release", + "test": "tap --coverage test.js" + }, + "version": "1.1.0" +} diff --git a/node_modules/octokit-pagination-methods/test.js b/node_modules/octokit-pagination-methods/test.js new file mode 100644 index 000000000..d16f4a2a3 --- /dev/null +++ b/node_modules/octokit-pagination-methods/test.js @@ -0,0 +1,93 @@ +const test = require('tap').test +const nock = require('nock') + +const Octokit = require('@octokit/rest') + .plugin(require('.')) + +test('@octokit/pagination-methods', (t) => { + nock('https://api.github.com', { + reqheaders: { + authorization: 'token secrettoken123' + } + }) + .get('/organizations') + .query({ page: 3, per_page: 1 }) + .reply(200, [{}], { + 'Link': '; rel="next", ; rel="first", ; rel="prev"', + 'X-GitHub-Media-Type': 'octokit.v3; format=json' + }) + .get('/organizations') + .query({ page: 1, per_page: 1 }) + .reply(200, [{}]) + .get('/organizations') + .query({ page: 2, per_page: 1 }) + .reply(200, [{}]) + .get('/organizations') + .query({ page: 4, per_page: 1 }) + .reply(404, {}) + + const octokit = new Octokit() + + octokit.authenticate({ + type: 'token', + token: 'secrettoken123' + }) + + return octokit.orgs.getAll({ + page: 3, + per_page: 1 + }) + + .then((response) => { + t.ok(octokit.hasNextPage(response)) + t.ok(octokit.hasPreviousPage(response)) + t.ok(octokit.hasFirstPage(response)) + t.notOk(octokit.hasLastPage(response)) + + const noop = () => {} + + return Promise.all([ + octokit.getFirstPage(response) + .then(response => { + t.doesNotThrow(() => { + octokit.hasPreviousPage(response) + }) + t.notOk(octokit.hasPreviousPage(response)) + }), + octokit.getPreviousPage(response, { foo: 'bar', accept: 'application/vnd.octokit.v3+json' }), + octokit.getNextPage(response).catch(noop), + octokit.getLastPage(response, { foo: 'bar' }) + .catch(error => { + t.equals(error.code, 404) + }), + // test error with promise + octokit.getLastPage(response).catch(noop) + ]) + }) + + .catch(t.error) +}) + +test('carries accept header correctly', () => { + nock('https://api.github.com', { + reqheaders: { + accept: 'application/vnd.github.hellcat-preview+json' + } + }) + .get('/user/teams') + .query({ per_page: 1 }) + .reply(200, [{}], { + 'Link': '; rel="next"', + 'X-GitHub-Media-Type': 'github; param=hellcat-preview; format=json' + }) + .get('/user/teams') + .query({ page: 2, per_page: 1 }) + .reply(200, []) + + const octokit = new Octokit() + + return octokit.users.getTeams({ per_page: 1 }) + .then(response => { + return octokit.getNextPage(response) + }) +}) diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md new file mode 100644 index 000000000..1f1ffca93 --- /dev/null +++ b/node_modules/once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js new file mode 100644 index 000000000..235406736 --- /dev/null +++ b/node_modules/once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/node_modules/once/package.json b/node_modules/once/package.json new file mode 100644 index 000000000..7a30cf544 --- /dev/null +++ b/node_modules/once/package.json @@ -0,0 +1,76 @@ +{ + "_args": [ + [ + "once@1.4.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "once@1.4.0", + "_id": "once@1.4.0", + "_inBundle": false, + "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "_location": "/once", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "once@1.4.0", + "name": "once", + "escapedName": "once", + "rawSpec": "1.4.0", + "saveSpec": null, + "fetchSpec": "1.4.0" + }, + "_requiredBy": [ + "/@octokit/request", + "/@octokit/request-error", + "/@octokit/rest", + "/end-of-stream", + "/glob", + "/inflight", + "/pump" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_spec": "1.4.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "dependencies": { + "wrappy": "1" + }, + "description": "Run a function exactly one time", + "devDependencies": { + "tap": "^7.0.1" + }, + "directories": { + "test": "test" + }, + "files": [ + "once.js" + ], + "homepage": "https://github.com/isaacs/once#readme", + "keywords": [ + "once", + "function", + "one", + "single" + ], + "license": "ISC", + "main": "once.js", + "name": "once", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.0" +} diff --git a/node_modules/os-name/index.d.ts b/node_modules/os-name/index.d.ts new file mode 100644 index 000000000..b1246ac20 --- /dev/null +++ b/node_modules/os-name/index.d.ts @@ -0,0 +1,37 @@ +/// + +/** +Get the name of the current operating system. + +By default, the name of the current operating system is returned. + +@param platform - Custom platform name. +@param release - Custom release name. + +@example +``` +import * as os fron 'os'; +import osName = require('os-name'); + +// On a macOS Sierra system + +osName(); +//=> 'macOS Sierra' + +osName(os.platform(), os.release()); +//=> 'macOS Sierra' + +osName('darwin', '14.0.0'); +//=> 'OS X Yosemite' + +osName('linux', '3.13.0-24-generic'); +//=> 'Linux 3.13' + +osName('win32', '6.3.9600'); +//=> 'Windows 8.1' +``` +*/ +declare function osName(): string; +declare function osName(platform: NodeJS.Platform, release: string): string; + +export = osName; diff --git a/node_modules/os-name/index.js b/node_modules/os-name/index.js new file mode 100644 index 000000000..f1287d5fa --- /dev/null +++ b/node_modules/os-name/index.js @@ -0,0 +1,46 @@ +'use strict'; +const os = require('os'); +const macosRelease = require('macos-release'); +const winRelease = require('windows-release'); + +const osName = (platform, release) => { + if (!platform && release) { + throw new Error('You can\'t specify a `release` without specifying `platform`'); + } + + platform = platform || os.platform(); + + let id; + + if (platform === 'darwin') { + if (!release && os.platform() === 'darwin') { + release = os.release(); + } + + const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; + id = release ? macosRelease(release).name : ''; + return prefix + (id ? ' ' + id : ''); + } + + if (platform === 'linux') { + if (!release && os.platform() === 'linux') { + release = os.release(); + } + + id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; + return 'Linux' + (id ? ' ' + id : ''); + } + + if (platform === 'win32') { + if (!release && os.platform() === 'win32') { + release = os.release(); + } + + id = release ? winRelease(release) : ''; + return 'Windows' + (id ? ' ' + id : ''); + } + + return platform; +}; + +module.exports = osName; diff --git a/node_modules/os-name/license b/node_modules/os-name/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/os-name/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/os-name/package.json b/node_modules/os-name/package.json new file mode 100644 index 000000000..9c1875b36 --- /dev/null +++ b/node_modules/os-name/package.json @@ -0,0 +1,80 @@ +{ + "_from": "os-name@^3.0.0", + "_id": "os-name@3.1.0", + "_inBundle": false, + "_integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "_location": "/os-name", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "os-name@^3.0.0", + "name": "os-name", + "escapedName": "os-name", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/@octokit/endpoint/universal-user-agent", + "/@octokit/request/universal-user-agent", + "/@octokit/rest/universal-user-agent", + "/universal-user-agent" + ], + "_resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "_shasum": "dec19d966296e1cd62d701a5a66ee1ddeae70801", + "_spec": "os-name@^3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint\\node_modules\\universal-user-agent", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-name/issues" + }, + "bundleDependencies": false, + "dependencies": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + }, + "deprecated": false, + "description": "Get the name of the current operating system. Example: macOS Sierra", + "devDependencies": { + "@types/node": "^11.13.0", + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/os-name#readme", + "keywords": [ + "os", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version", + "macos", + "windows", + "linux" + ], + "license": "MIT", + "name": "os-name", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-name.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.0" +} diff --git a/node_modules/os-name/readme.md b/node_modules/os-name/readme.md new file mode 100644 index 000000000..35812b253 --- /dev/null +++ b/node_modules/os-name/readme.md @@ -0,0 +1,64 @@ +# os-name [![Build Status](https://travis-ci.org/sindresorhus/os-name.svg?branch=master)](https://travis-ci.org/sindresorhus/os-name) + +> Get the name of the current operating system
+> Example: `macOS Sierra` + +Useful for analytics and debugging. + + +## Install + +``` +$ npm install os-name +``` + + +## Usage + +```js +const os = require('os'); +const osName = require('os-name'); + +// On a macOS Sierra system + +osName(); +//=> 'macOS Sierra' + +osName(os.platform(), os.release()); +//=> 'macOS Sierra' + +osName('darwin', '14.0.0'); +//=> 'OS X Yosemite' + +osName('linux', '3.13.0-24-generic'); +//=> 'Linux 3.13' + +osName('win32', '6.3.9600'); +//=> 'Windows 8.1' +``` + + +## API + +### osName([platform, release]) + +By default, the name of the current operating system is returned. + +You can optionally supply a custom [`os.platform()`](https://nodejs.org/api/os.html#os_os_platform) and [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Check out [`getos`](https://github.com/wblankenship/getos) if you need the Linux distribution name. + + +## Contributing + +Production systems depend on this package for logging / tracking. Please be careful when introducing new output, and adhere to existing output format (whitespace, capitalization, etc.). + + +## Related + +- [os-name-cli](https://github.com/sindresorhus/os-name-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-finally/index.js b/node_modules/p-finally/index.js new file mode 100644 index 000000000..52b7b49c5 --- /dev/null +++ b/node_modules/p-finally/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = (promise, onFinally) => { + onFinally = onFinally || (() => {}); + + return promise.then( + val => new Promise(resolve => { + resolve(onFinally()); + }).then(() => val), + err => new Promise(resolve => { + resolve(onFinally()); + }).then(() => { + throw err; + }) + ); +}; diff --git a/node_modules/p-finally/license b/node_modules/p-finally/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/p-finally/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/p-finally/package.json b/node_modules/p-finally/package.json new file mode 100644 index 000000000..7947f4c92 --- /dev/null +++ b/node_modules/p-finally/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "p-finally@1.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "p-finally@1.0.0", + "_id": "p-finally@1.0.0", + "_inBundle": false, + "_integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "_location": "/p-finally", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-finally@1.0.0", + "name": "p-finally", + "escapedName": "p-finally", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-finally/issues" + }, + "description": "`Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-finally#readme", + "keywords": [ + "promise", + "finally", + "handler", + "function", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "license": "MIT", + "name": "p-finally", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-finally.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-finally/readme.md b/node_modules/p-finally/readme.md new file mode 100644 index 000000000..09ef36416 --- /dev/null +++ b/node_modules/p-finally/readme.md @@ -0,0 +1,47 @@ +# p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) + +> [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome + +Useful for cleanup. + + +## Install + +``` +$ npm install --save p-finally +``` + + +## Usage + +```js +const pFinally = require('p-finally'); + +const dir = createTempDir(); + +pFinally(write(dir), () => cleanup(dir)); +``` + + +## API + +### pFinally(promise, [onFinally]) + +Returns a `Promise`. + +#### onFinally + +Type: `Function` + +Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. + + +## Related + +- [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-key/index.js b/node_modules/path-key/index.js new file mode 100644 index 000000000..62c8250ab --- /dev/null +++ b/node_modules/path-key/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = opts => { + opts = opts || {}; + + const env = opts.env || process.env; + const platform = opts.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; + } + + return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; +}; diff --git a/node_modules/path-key/license b/node_modules/path-key/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/path-key/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/path-key/package.json b/node_modules/path-key/package.json new file mode 100644 index 000000000..24e4ccf1f --- /dev/null +++ b/node_modules/path-key/package.json @@ -0,0 +1,76 @@ +{ + "_args": [ + [ + "path-key@2.0.1", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "path-key@2.0.1", + "_id": "path-key@2.0.1", + "_inBundle": false, + "_integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "_location": "/path-key", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "path-key@2.0.1", + "name": "path-key", + "escapedName": "path-key", + "rawSpec": "2.0.1", + "saveSpec": null, + "fetchSpec": "2.0.1" + }, + "_requiredBy": [ + "/cross-spawn", + "/npm-run-path" + ], + "_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "_spec": "2.0.1", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-key/issues" + }, + "description": "Get the PATH environment variable key cross-platform", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/path-key#readme", + "keywords": [ + "path", + "key", + "environment", + "env", + "variable", + "var", + "get", + "cross-platform", + "windows" + ], + "license": "MIT", + "name": "path-key", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-key.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1", + "xo": { + "esnext": true + } +} diff --git a/node_modules/path-key/readme.md b/node_modules/path-key/readme.md new file mode 100644 index 000000000..cb5710aac --- /dev/null +++ b/node_modules/path-key/readme.md @@ -0,0 +1,51 @@ +# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) + +> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform + +It's usually `PATH`, but on Windows it can be any casing like `Path`... + + +## Install + +``` +$ npm install --save path-key +``` + + +## Usage + +```js +const pathKey = require('path-key'); + +const key = pathKey(); +//=> 'PATH' + +const PATH = process.env[key]; +//=> '/usr/local/bin:/usr/bin:/bin' +``` + + +## API + +### pathKey([options]) + +#### options + +##### env + +Type: `Object`
+Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) + +Use a custom environment variables object. + +#### platform + +Type: `string`
+Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) + +Get the PATH key for a specific platform. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pump/.travis.yml b/node_modules/pump/.travis.yml new file mode 100644 index 000000000..17f94330e --- /dev/null +++ b/node_modules/pump/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + +script: "npm test" diff --git a/node_modules/pump/LICENSE b/node_modules/pump/LICENSE new file mode 100644 index 000000000..757562ec5 --- /dev/null +++ b/node_modules/pump/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +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. \ No newline at end of file diff --git a/node_modules/pump/README.md b/node_modules/pump/README.md new file mode 100644 index 000000000..4c81471a0 --- /dev/null +++ b/node_modules/pump/README.md @@ -0,0 +1,65 @@ +# pump + +pump is a small node module that pipes streams together and destroys all of them if one of them closes. + +``` +npm install pump +``` + +[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) + +## What problem does it solve? + +When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. +You are also not able to provide a callback to tell when then pipe has finished. + +pump does these two things for you + +## Usage + +Simply pass the streams you want to pipe together to pump and add an optional callback + +``` js +var pump = require('pump') +var fs = require('fs') + +var source = fs.createReadStream('/dev/random') +var dest = fs.createWriteStream('/dev/null') + +pump(source, dest, function(err) { + console.log('pipe finished', err) +}) + +setTimeout(function() { + dest.destroy() // when dest is closed pump will destroy source +}, 1000) +``` + +You can use pump to pipe more than two streams together as well + +``` js +var transform = someTransformStream() + +pump(source, transform, anotherTransform, dest, function(err) { + console.log('pipe finished', err) +}) +``` + +If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. + +Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: + +``` +return pump(s1, s2) // returns s2 +``` + +If you want to return a stream that combines *both* s1 and s2 to a single stream use +[pumpify](https://github.com/mafintosh/pumpify) instead. + +## License + +MIT + +## Related + +`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/pump/index.js b/node_modules/pump/index.js new file mode 100644 index 000000000..c15059f17 --- /dev/null +++ b/node_modules/pump/index.js @@ -0,0 +1,82 @@ +var once = require('once') +var eos = require('end-of-stream') +var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + return streams.reduce(pipe) +} + +module.exports = pump diff --git a/node_modules/pump/package.json b/node_modules/pump/package.json new file mode 100644 index 000000000..60a5283e0 --- /dev/null +++ b/node_modules/pump/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "pump@3.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "pump@3.0.0", + "_id": "pump@3.0.0", + "_inBundle": false, + "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "_location": "/pump", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "pump@3.0.0", + "name": "pump", + "escapedName": "pump", + "rawSpec": "3.0.0", + "saveSpec": null, + "fetchSpec": "3.0.0" + }, + "_requiredBy": [ + "/get-stream" + ], + "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "_spec": "3.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/mafintosh/pump/issues" + }, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "description": "pipe streams together and close all of them if one of them closes", + "homepage": "https://github.com/mafintosh/pump#readme", + "keywords": [ + "streams", + "pipe", + "destroy", + "callback" + ], + "license": "MIT", + "name": "pump", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pump.git" + }, + "scripts": { + "test": "node test-browser.js && node test-node.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/pump/test-browser.js b/node_modules/pump/test-browser.js new file mode 100644 index 000000000..9a06c8a4c --- /dev/null +++ b/node_modules/pump/test-browser.js @@ -0,0 +1,66 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-browser.js passes') + clearTimeout(timeout) + } +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +var timeout = setTimeout(function () { + check() + throw new Error('timeout') +}, 5000) diff --git a/node_modules/pump/test-node.js b/node_modules/pump/test-node.js new file mode 100644 index 000000000..561251a08 --- /dev/null +++ b/node_modules/pump/test-node.js @@ -0,0 +1,53 @@ +var pump = require('./index') + +var rs = require('fs').createReadStream('/dev/random') +var ws = require('fs').createWriteStream('/dev/null') + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-node.js passes') + clearTimeout(timeout) + } +} + +ws.on('close', function () { + wsClosed = true + check() +}) + +rs.on('close', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.destroy() +}, 1000) + +var timeout = setTimeout(function () { + throw new Error('timeout') +}, 5000) diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 000000000..2de70b074 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 000000000..0f8cf79c3 --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +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/node_modules/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 000000000..4e6726240 --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + "shebang-command@1.2.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "shebang-command@1.2.0", + "_id": "shebang-command@1.2.0", + "_inBundle": false, + "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "_location": "/shebang-command", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-command@1.2.0", + "name": "shebang-command", + "escapedName": "shebang-command", + "rawSpec": "1.2.0", + "saveSpec": null, + "fetchSpec": "1.2.0" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_spec": "1.2.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "name": "shebang-command", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 000000000..16b0be4d7 --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 000000000..d052d2e05 --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 000000000..a2385ed07 --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,68 @@ +{ + "_args": [ + [ + "shebang-regex@1.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "shebang-regex@1.0.0", + "_id": "shebang-regex@1.0.0", + "_inBundle": false, + "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "_location": "/shebang-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "shebang-regex@1.0.0", + "name": "shebang-regex", + "escapedName": "shebang-regex", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/shebang-regex#readme", + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "license": "MIT", + "name": "shebang-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 000000000..ef75e51b5 --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 000000000..e2f70d225 --- /dev/null +++ b/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) + + +### Bug Fixes + +* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) + + + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 000000000..eead04a12 --- /dev/null +++ b/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md new file mode 100644 index 000000000..8ebccabec --- /dev/null +++ b/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js new file mode 100644 index 000000000..337f691ed --- /dev/null +++ b/node_modules/signal-exit/index.js @@ -0,0 +1,157 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +// Because this emitter is a global, we have to check to see if a +// previous version of this library failed to enable infinite listeners. +// I know what you're about to say. But literally everything about +// signal-exit is a compromise with evil. Get used to it. +if (!emitter.infinite) { + emitter.setMaxListeners(Infinity) + emitter.infinite = true +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json new file mode 100644 index 000000000..8435f25e1 --- /dev/null +++ b/node_modules/signal-exit/package.json @@ -0,0 +1,71 @@ +{ + "_args": [ + [ + "signal-exit@3.0.2", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "signal-exit@3.0.2", + "_id": "signal-exit@3.0.2", + "_inBundle": false, + "_integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "_location": "/signal-exit", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "signal-exit@3.0.2", + "name": "signal-exit", + "escapedName": "signal-exit", + "rawSpec": "3.0.2", + "saveSpec": null, + "fetchSpec": "3.0.2" + }, + "_requiredBy": [ + "/execa", + "/write-file-atomic" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "_spec": "3.0.2", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.10", + "nyc": "^8.1.0", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^8.0.1" + }, + "files": [ + "index.js", + "signals.js" + ], + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "name": "signal-exit", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.2" +} diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js new file mode 100644 index 000000000..3bd67a8a5 --- /dev/null +++ b/node_modules/signal-exit/signals.js @@ -0,0 +1,53 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +// +// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised +// artificially, inherently leave the process in a +// state from which it is not safe to try and enter JS +// listeners. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGHUP', + 'SIGINT', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/node_modules/strip-eof/index.js b/node_modules/strip-eof/index.js new file mode 100644 index 000000000..a17d0afd3 --- /dev/null +++ b/node_modules/strip-eof/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; diff --git a/node_modules/strip-eof/license b/node_modules/strip-eof/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/strip-eof/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/strip-eof/package.json b/node_modules/strip-eof/package.json new file mode 100644 index 000000000..f409af914 --- /dev/null +++ b/node_modules/strip-eof/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + "strip-eof@1.0.0", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "strip-eof@1.0.0", + "_id": "strip-eof@1.0.0", + "_inBundle": false, + "_integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "_location": "/strip-eof", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "strip-eof@1.0.0", + "name": "strip-eof", + "escapedName": "strip-eof", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/execa" + ], + "_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-eof/issues" + }, + "description": "Strip the End-Of-File (EOF) character from a string/buffer", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/strip-eof#readme", + "keywords": [ + "strip", + "trim", + "remove", + "delete", + "eof", + "end", + "file", + "newline", + "linebreak", + "character", + "string", + "buffer" + ], + "license": "MIT", + "name": "strip-eof", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-eof.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/strip-eof/readme.md b/node_modules/strip-eof/readme.md new file mode 100644 index 000000000..45ffe0436 --- /dev/null +++ b/node_modules/strip-eof/readme.md @@ -0,0 +1,28 @@ +# strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) + +> Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer + + +## Install + +``` +$ npm install --save strip-eof +``` + + +## Usage + +```js +const stripEof = require('strip-eof'); + +stripEof('foo\nbar\n\n'); +//=> 'foo\nbar\n' + +stripEof(new Buffer('foo\nbar\n\n')).toString(); +//=> 'foo\nbar\n' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/universal-user-agent/.travis.yml b/node_modules/universal-user-agent/.travis.yml new file mode 100644 index 000000000..d54089575 --- /dev/null +++ b/node_modules/universal-user-agent/.travis.yml @@ -0,0 +1,38 @@ +language: node_js +cache: + directories: + - ~/.npm + - node_modules/cypress/dist + +# Trigger a push build on master and greenkeeper branches + PRs build on every branches +# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) +branches: + only: + - master + - /^greenkeeper.*$/ + +stages: + - test + - name: release + if: branch = master AND type IN (push) + +jobs: + include: + - stage: test + node_js: 6 + script: npm run test + - node_js: 8 + script: npm run test + - node_js: 10 + env: Node 10 & coverage upload + script: + - npm run test + - npm run coverage:upload + - node_js: lts/* + env: browser tests + script: npm run test:browser + + - stage: release + node_js: lts/* + env: semantic-release + script: npm run semantic-release diff --git a/node_modules/universal-user-agent/LICENSE.md b/node_modules/universal-user-agent/LICENSE.md new file mode 100644 index 000000000..f105ab0c0 --- /dev/null +++ b/node_modules/universal-user-agent/LICENSE.md @@ -0,0 +1,7 @@ +# [ISC License](https://spdx.org/licenses/ISC) + +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/universal-user-agent/README.md b/node_modules/universal-user-agent/README.md new file mode 100644 index 000000000..59e809ed8 --- /dev/null +++ b/node_modules/universal-user-agent/README.md @@ -0,0 +1,25 @@ +# universal-user-agent + +> Get a user agent string in both browser and node + +[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) +[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) +[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) +[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) + +```js +const getUserAgent = require('universal-user-agent') +const userAgent = getUserAgent() + +// userAgent will look like this +// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" +// in node: Node.js/v8.9.4 (macOS High Sierra; x64) +``` + +## Credits + +The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). + +## License + +[ISC](LICENSE.md) diff --git a/node_modules/universal-user-agent/browser.js b/node_modules/universal-user-agent/browser.js new file mode 100644 index 000000000..eb1274439 --- /dev/null +++ b/node_modules/universal-user-agent/browser.js @@ -0,0 +1,6 @@ +module.exports = getUserAgentBrowser + +function getUserAgentBrowser () { + /* global navigator */ + return navigator.userAgent +} diff --git a/node_modules/universal-user-agent/cypress.json b/node_modules/universal-user-agent/cypress.json new file mode 100644 index 000000000..a1ff4b85e --- /dev/null +++ b/node_modules/universal-user-agent/cypress.json @@ -0,0 +1,4 @@ +{ + "integrationFolder": "test", + "video": false +} diff --git a/node_modules/universal-user-agent/index.d.ts b/node_modules/universal-user-agent/index.d.ts new file mode 100644 index 000000000..04dfc0435 --- /dev/null +++ b/node_modules/universal-user-agent/index.d.ts @@ -0,0 +1 @@ +export default function getUserAgentNode(): string; diff --git a/node_modules/universal-user-agent/index.js b/node_modules/universal-user-agent/index.js new file mode 100644 index 000000000..ef2d06b28 --- /dev/null +++ b/node_modules/universal-user-agent/index.js @@ -0,0 +1,15 @@ +module.exports = getUserAgentNode + +const osName = require('os-name') + +function getUserAgentNode () { + try { + return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` + } catch (error) { + if (/wmic os get Caption/.test(error.message)) { + return 'Windows ' + } + + throw error + } +} diff --git a/node_modules/universal-user-agent/package.json b/node_modules/universal-user-agent/package.json new file mode 100644 index 000000000..913544fd3 --- /dev/null +++ b/node_modules/universal-user-agent/package.json @@ -0,0 +1,82 @@ +{ + "_from": "universal-user-agent@^2.0.3", + "_id": "universal-user-agent@2.1.0", + "_inBundle": false, + "_integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==", + "_location": "/universal-user-agent", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "universal-user-agent@^2.0.3", + "name": "universal-user-agent", + "escapedName": "universal-user-agent", + "rawSpec": "^2.0.3", + "saveSpec": null, + "fetchSpec": "^2.0.3" + }, + "_requiredBy": [ + "/@octokit/graphql" + ], + "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz", + "_shasum": "5abfbcc036a1ba490cb941f8fd68c46d3669e8e4", + "_spec": "universal-user-agent@^2.0.3", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\graphql", + "author": { + "name": "Gregor Martynus", + "url": "https://github.com/gr2m" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/gr2m/universal-user-agent/issues" + }, + "bundleDependencies": false, + "dependencies": { + "os-name": "^3.0.0" + }, + "deprecated": false, + "description": "Get a user agent string in both browser and node", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.2", + "cypress": "^3.1.0", + "mocha": "^6.0.0", + "nyc": "^14.0.0", + "proxyquire": "^2.1.0", + "semantic-release": "^15.9.15", + "sinon": "^7.2.4", + "sinon-chai": "^3.2.0", + "standard": "^12.0.1", + "test": "^0.6.0", + "travis-deploy-once": "^5.0.7" + }, + "homepage": "https://github.com/gr2m/universal-user-agent#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "universal-user-agent", + "repository": { + "type": "git", + "url": "git+https://github.com/gr2m/universal-user-agent.git" + }, + "scripts": { + "coverage": "nyc report --reporter=html && open coverage/index.html", + "coverage:upload": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "semantic-release": "semantic-release", + "test": "nyc mocha \"test/*-test.js\"", + "test:browser": "cypress run --browser chrome", + "travis-deploy-once": "travis-deploy-once" + }, + "standard": { + "globals": [ + "describe", + "it", + "beforeEach", + "afterEach", + "expect" + ] + }, + "types": "index.d.ts", + "version": "2.1.0" +} diff --git a/node_modules/universal-user-agent/test/smoke-test.js b/node_modules/universal-user-agent/test/smoke-test.js new file mode 100644 index 000000000..d71b2d51c --- /dev/null +++ b/node_modules/universal-user-agent/test/smoke-test.js @@ -0,0 +1,57 @@ +// make tests run in both Node & Express +if (!global.cy) { + const chai = require('chai') + const sinon = require('sinon') + const sinonChai = require('sinon-chai') + chai.use(sinonChai) + global.expect = chai.expect + + let sandbox + beforeEach(() => { + sandbox = sinon.createSandbox() + global.cy = { + stub: function () { + return sandbox.stub.apply(sandbox, arguments) + }, + log () { + console.log.apply(console, arguments) + } + } + }) + + afterEach(() => { + sandbox.restore() + }) +} + +const getUserAgent = require('..') + +describe('smoke', () => { + it('works', () => { + expect(getUserAgent()).to.be.a('string') + expect(getUserAgent().length).to.be.above(10) + }) + + if (!process.browser) { // test on node only + const proxyquire = require('proxyquire').noCallThru() + it('works around wmic error on Windows (#5)', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('Command failed: wmic os get Caption') + } + }) + + expect(getUserAgent()).to.equal('Windows ') + }) + + it('does not swallow unexpected errors', () => { + const getUserAgent = proxyquire('..', { + 'os-name': () => { + throw new Error('oops') + } + }) + + expect(getUserAgent).to.throw('oops') + }) + } +}) diff --git a/node_modules/url-template/.gitmodules b/node_modules/url-template/.gitmodules new file mode 100644 index 000000000..c7d8f4244 --- /dev/null +++ b/node_modules/url-template/.gitmodules @@ -0,0 +1,3 @@ +[submodule "uritemplate-test"] + path = uritemplate-test + url = https://github.com/uri-templates/uritemplate-test diff --git a/node_modules/url-template/.npmignore b/node_modules/url-template/.npmignore new file mode 100644 index 000000000..096746c14 --- /dev/null +++ b/node_modules/url-template/.npmignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/node_modules/url-template/LICENSE b/node_modules/url-template/LICENSE new file mode 100644 index 000000000..ae46ad7b8 --- /dev/null +++ b/node_modules/url-template/LICENSE @@ -0,0 +1,25 @@ +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. diff --git a/node_modules/url-template/README.md b/node_modules/url-template/README.md new file mode 100644 index 000000000..a22749d0c --- /dev/null +++ b/node_modules/url-template/README.md @@ -0,0 +1,32 @@ +## A JavaScript URI template implementation + +This is a simple URI template implementation following the [RFC 6570 URI Template specification](http://tools.ietf.org/html/rfc6570). The implementation supports all levels defined in the specification and is extensively tested. + +## Installation + +For use with Node.js you can install it through npm: + + $ npm install url-template + +If you want to use it in a browser, copy `lib/url-template.js` into your project and use the global `urltemplate` instance. Alternatively you can use [Bower](http://bower.io/) to install this package: + + $ bower install url-template + +## Example + + var template = require('url-template'); + + ... + + var emailUrl = template.parse('/{email}/{folder}/{id}'); + + // Returns '/user@domain/test/42' + emailUrl.expand({ + email: 'user@domain', + folder: 'test', + id: 42 + }); + +## A note on error handling and reporting + +The RFC states that errors in the templates could optionally be handled and reported to the user. This implementation takes a slightly different approach in that it tries to do a best effort template expansion and leaves erroneous expressions in the returned URI instead of throwing errors. So for example, the incorrect expression `{unclosed` will return `{unclosed` as output. The leaves incorrect URLs to be handled by your URL library of choice. diff --git a/node_modules/url-template/lib/url-template.js b/node_modules/url-template/lib/url-template.js new file mode 100644 index 000000000..8d6aae1f6 --- /dev/null +++ b/node_modules/url-template/lib/url-template.js @@ -0,0 +1,192 @@ +(function (root, factory) { + if (typeof exports === 'object') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define([], factory); + } else { + root.urltemplate = factory(); + } +}(this, function () { + /** + * @constructor + */ + function UrlTemplate() { + } + + /** + * @private + * @param {string} str + * @return {string} + */ + UrlTemplate.prototype.encodeReserved = function (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(''); + }; + + /** + * @private + * @param {string} str + * @return {string} + */ + UrlTemplate.prototype.encodeUnreserved = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); + } + + /** + * @private + * @param {string} operator + * @param {string} value + * @param {string} key + * @return {string} + */ + UrlTemplate.prototype.encodeValue = function (operator, value, key) { + value = (operator === '+' || operator === '#') ? this.encodeReserved(value) : this.encodeUnreserved(value); + + if (key) { + return this.encodeUnreserved(key) + '=' + value; + } else { + return value; + } + }; + + /** + * @private + * @param {*} value + * @return {boolean} + */ + UrlTemplate.prototype.isDefined = function (value) { + return value !== undefined && value !== null; + }; + + /** + * @private + * @param {string} + * @return {boolean} + */ + UrlTemplate.prototype.isKeyOperator = function (operator) { + return operator === ';' || operator === '&' || operator === '?'; + }; + + /** + * @private + * @param {Object} context + * @param {string} operator + * @param {string} key + * @param {string} modifier + */ + UrlTemplate.prototype.getValues = function (context, operator, key, modifier) { + var value = context[key], + result = []; + + if (this.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(this.encodeValue(operator, value, this.isKeyOperator(operator) ? key : null)); + } else { + if (modifier === '*') { + if (Array.isArray(value)) { + value.filter(this.isDefined).forEach(function (value) { + result.push(this.encodeValue(operator, value, this.isKeyOperator(operator) ? key : null)); + }, this); + } else { + Object.keys(value).forEach(function (k) { + if (this.isDefined(value[k])) { + result.push(this.encodeValue(operator, value[k], k)); + } + }, this); + } + } else { + var tmp = []; + + if (Array.isArray(value)) { + value.filter(this.isDefined).forEach(function (value) { + tmp.push(this.encodeValue(operator, value)); + }, this); + } else { + Object.keys(value).forEach(function (k) { + if (this.isDefined(value[k])) { + tmp.push(this.encodeUnreserved(k)); + tmp.push(this.encodeValue(operator, value[k].toString())); + } + }, this); + } + + if (this.isKeyOperator(operator)) { + result.push(this.encodeUnreserved(key) + '=' + tmp.join(',')); + } else if (tmp.length !== 0) { + result.push(tmp.join(',')); + } + } + } + } else { + if (operator === ';') { + if (this.isDefined(value)) { + result.push(this.encodeUnreserved(key)); + } + } else if (value === '' && (operator === '&' || operator === '?')) { + result.push(this.encodeUnreserved(key) + '='); + } else if (value === '') { + result.push(''); + } + } + return result; + }; + + /** + * @param {string} template + * @return {function(Object):string} + */ + UrlTemplate.prototype.parse = function (template) { + var that = this; + var operators = ['+', '#', '.', '/', ';', '?', '&']; + + return { + expand: function (context) { + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + var operator = null, + 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.apply(values, that.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 that.encodeReserved(literal); + } + }); + } + }; + }; + + return new UrlTemplate(); +})); diff --git a/node_modules/url-template/package.json b/node_modules/url-template/package.json new file mode 100644 index 000000000..dc9988467 --- /dev/null +++ b/node_modules/url-template/package.json @@ -0,0 +1,66 @@ +{ + "_from": "url-template@^2.0.8", + "_id": "url-template@2.0.8", + "_inBundle": false, + "_integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=", + "_location": "/url-template", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "url-template@^2.0.8", + "name": "url-template", + "escapedName": "url-template", + "rawSpec": "^2.0.8", + "saveSpec": null, + "fetchSpec": "^2.0.8" + }, + "_requiredBy": [ + "/@octokit/endpoint", + "/@octokit/rest" + ], + "_resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", + "_shasum": "fc565a3cccbff7730c775f5641f9555791439f21", + "_spec": "url-template@^2.0.8", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\endpoint", + "author": { + "name": "Bram Stein", + "email": "b.l.stein@gmail.com", + "url": "http://www.bramstein.com" + }, + "bugs": { + "url": "https://github.com/bramstein/url-template/issues" + }, + "bundleDependencies": false, + "decription": "A URI template implementation (RFC 6570 compliant)", + "deprecated": false, + "description": "This is a simple URI template implementation following the [RFC 6570 URI Template specification](http://tools.ietf.org/html/rfc6570). The implementation supports all levels defined in the specification and is extensively tested.", + "devDependencies": { + "expect.js": "=0.2.0", + "mocha": "=1.6.0" + }, + "directories": { + "lib": "./lib" + }, + "homepage": "https://github.com/bramstein/url-template#readme", + "keywords": [ + "uri-template", + "uri template", + "uri", + "url", + "rfc 6570", + "url template", + "url-template" + ], + "license": "BSD", + "main": "./lib/url-template.js", + "name": "url-template", + "repository": { + "type": "git", + "url": "git://github.com/bramstein/url-template.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "version": "2.0.8" +} diff --git a/node_modules/url-template/test/index.html b/node_modules/url-template/test/index.html new file mode 100644 index 000000000..727d63d7e --- /dev/null +++ b/node_modules/url-template/test/index.html @@ -0,0 +1,21 @@ + + + + Mocha Tests + + + +
+ + + + + + + + + + diff --git a/node_modules/url-template/test/uritemplate-test.js b/node_modules/url-template/test/uritemplate-test.js new file mode 100644 index 000000000..ec12cb18b --- /dev/null +++ b/node_modules/url-template/test/uritemplate-test.js @@ -0,0 +1,32 @@ +var template, expect, examples; + +if (typeof require !== 'undefined') { + template = require('../lib/url-template.js'); + expect = require("expect.js"); + examples = require('../uritemplate-test/spec-examples-by-section.json'); +} else { + template = window.urltemplate; + expect = window.expect; + examples = window.examples; +} + +function createTestContext(c) { + return function (t, r) { + if (typeof r === 'string') { + expect(template.parse(t).expand(c)).to.eql(r); + } else { + expect(r.indexOf(template.parse(t).expand(c)) >= 0).to.be.ok(); + } + }; +} + +describe('spec-examples', function () { + Object.keys(examples).forEach(function (section) { + var assert = createTestContext(examples[section].variables); + examples[section].testcases.forEach(function (testcase) { + it(section + ' ' + testcase[0], function () { + assert(testcase[0], testcase[1]); + }); + }); + }); +}); diff --git a/node_modules/url-template/test/url-template-test.js b/node_modules/url-template/test/url-template-test.js new file mode 100644 index 000000000..d9ff457a8 --- /dev/null +++ b/node_modules/url-template/test/url-template-test.js @@ -0,0 +1,373 @@ +var template, expect; + +if (typeof require !== 'undefined') { + template = require('../lib/url-template.js'); + expect = require("expect.js"); +} else { + template = window.urltemplate; + expect = window.expect; +} + +function createTestContext(c) { + return function (t, r) { + expect(template.parse(t).expand(c)).to.eql(r); + }; +} + +describe('uri-template', function () { + describe('Level 1', function () { + var assert = createTestContext({ + 'var': 'value', + 'some.value': 'some', + 'some_value': 'value', + 'Some%20Thing': 'hello', + 'foo': 'bar', + 'hello': 'Hello World!', + 'bool': false, + 'toString': 'string', + 'number': 42, + 'float': 3.14, + 'undef': undefined, + 'null': null, + 'chars': 'šö䟜ñꀣ¥‡ÑÒÓÔÕÖ×ØÙÚàáâãäåæçÿü', + 'surrogatepairs': '\uD834\uDF06' + }); + + it('empty string', function () { + assert('', ''); + }); + + it('encodes non expressions correctly', function () { + assert('hello/world', 'hello/world'); + assert('Hello World!/{foo}', 'Hello%20World!/bar'); + assert(':/?#[]@!$&()*+,;=\'', ':/?#[]@!$&()*+,;=\''); + assert('%20', '%20'); + assert('%xyz', '%25xyz'); + assert('%', '%25'); + }); + + it('expand plain ASCII strings', function () { + assert('{var}', 'value'); + }); + + it('expand non-ASCII strings', function () { + assert('{chars}', '%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF%C3%BC'); + }); + + it('expands and encodes surrogate pairs correctly', function () { + assert('{surrogatepairs}', '%F0%9D%8C%86'); + }); + + it('expand expressions with dot and underscore', function () { + assert('{some.value}', 'some'); + assert('{some_value}', 'value'); + }); + + it('expand expressions with encoding', function () { + assert('{Some%20Thing}', 'hello'); + }); + + it('expand expressions with reserved JavaScript names', function () { + assert('{toString}', 'string'); + }); + + it('expand variables that are not strings', function () { + assert('{number}', '42'); + assert('{float}', '3.14'); + assert('{bool}', 'false'); + }); + + it('expand variables that are undefined or null', function () { + assert('{undef}', ''); + assert('{null}', ''); + }); + + it('expand multiple values', function () { + assert('{var}/{foo}', 'value/bar'); + }); + + it('escape invalid characters correctly', function () { + assert('{hello}', 'Hello%20World%21'); + }); + }); + + describe('Level 2', function () { + var assert = createTestContext({ + 'var': 'value', + 'hello': 'Hello World!', + 'path': '/foo/bar' + }); + + it('reserved expansion of basic strings', function () { + assert('{+var}', 'value'); + assert('{+hello}', 'Hello%20World!'); + }); + + it('preserves paths', function() { + assert('{+path}/here', '/foo/bar/here'); + assert('here?ref={+path}', 'here?ref=/foo/bar'); + }); + }); + + describe('Level 3', function () { + var assert = createTestContext({ + 'var' : 'value', + 'hello' : 'Hello World!', + 'empty' : '', + 'path' : '/foo/bar', + 'x' : '1024', + 'y' : '768' + }); + + it('variables without an operator', function () { + assert('map?{x,y}', 'map?1024,768'); + assert('{x,hello,y}', '1024,Hello%20World%21,768'); + }); + + it('variables with the reserved expansion operator', function () { + assert('{+x,hello,y}', '1024,Hello%20World!,768'); + assert('{+path,x}/here', '/foo/bar,1024/here'); + }); + + it('variables with the fragment expansion operator', function () { + assert('{#x,hello,y}', '#1024,Hello%20World!,768'); + assert('{#path,x}/here', '#/foo/bar,1024/here'); + }); + + it('variables with the dot operator', function () { + assert('X{.var}', 'X.value'); + assert('X{.x,y}', 'X.1024.768'); + }); + + it('variables with the path operator', function () { + assert('{/var}', '/value'); + assert('{/var,x}/here', '/value/1024/here'); + }); + + it('variables with the parameter operator', function () { + assert('{;x,y}', ';x=1024;y=768'); + assert('{;x,y,empty}', ';x=1024;y=768;empty'); + }); + + it('variables with the query operator', function () { + assert('{?x,y}', '?x=1024&y=768'); + assert('{?x,y,empty}', '?x=1024&y=768&empty='); + }); + + it('variables with the query continuation operator', function () { + assert('?fixed=yes{&x}', '?fixed=yes&x=1024'); + assert('{&x,y,empty}', '&x=1024&y=768&empty='); + }); + }); + + describe('Level 4', function () { + var assert = createTestContext({ + 'var': 'value', + 'hello': 'Hello World!', + 'path': '/foo/bar', + 'list': ['red', 'green', 'blue'], + 'keys': { + 'semi': ';', + 'dot': '.', + 'comma': ',' + }, + "chars": { + 'ü': 'ü' + }, + 'number': 2133, + 'emptystring': '', + 'emptylist': [], + 'emptyobject': {}, + 'undefinedlistitem': [1,,2], + 'undefinedobjectitem': { key: null, hello: 'world', 'empty': '', '': 'nothing' } + }); + + it('variable empty list', function () { + assert('{/emptylist}', ''); + assert('{/emptylist*}', ''); + assert('{?emptylist}', '?emptylist='); + assert('{?emptylist*}', ''); + }); + + it('variable empty object', function () { + assert('{/emptyobject}', ''); + assert('{/emptyobject*}', ''); + assert('{?emptyobject}', '?emptyobject='); + assert('{?emptyobject*}', ''); + }); + + it('variable undefined list item', function () { + assert('{undefinedlistitem}', '1,2'); + assert('{undefinedlistitem*}', '1,2'); + assert('{?undefinedlistitem*}', '?undefinedlistitem=1&undefinedlistitem=2'); + }); + + it('variable undefined object item', function () { + assert('{undefinedobjectitem}', 'hello,world,empty,,,nothing'); + assert('{undefinedobjectitem*}', 'hello=world,empty=,nothing'); + }); + + it('variable empty string', function () { + assert('{emptystring}', ''); + assert('{+emptystring}', ''); + assert('{#emptystring}', '#'); + assert('{.emptystring}', '.'); + assert('{/emptystring}', '/'); + assert('{;emptystring}', ';emptystring'); + assert('{?emptystring}', '?emptystring='); + assert('{&emptystring}', '&emptystring='); + }); + + it('variable modifiers prefix', function () { + assert('{var:3}', 'val'); + assert('{var:30}', 'value'); + assert('{+path:6}/here', '/foo/b/here'); + assert('{#path:6}/here', '#/foo/b/here'); + assert('X{.var:3}', 'X.val'); + assert('{/var:1,var}', '/v/value'); + assert('{;hello:5}', ';hello=Hello'); + assert('{?var:3}', '?var=val'); + assert('{&var:3}', '&var=val'); + }); + + it('variable modifier prefix converted to string', function () { + assert('{number:3}', '213'); + }); + + it('variable list expansion', function () { + assert('{list}', 'red,green,blue'); + assert('{+list}', 'red,green,blue'); + assert('{#list}', '#red,green,blue'); + assert('{/list}', '/red,green,blue'); + assert('{;list}', ';list=red,green,blue'); + assert('{.list}', '.red,green,blue'); + assert('{?list}', '?list=red,green,blue'); + assert('{&list}', '&list=red,green,blue'); + }); + + it('variable associative array expansion', function () { + assert('{keys}', 'semi,%3B,dot,.,comma,%2C'); + assert('{keys*}', 'semi=%3B,dot=.,comma=%2C'); + assert('{+keys}', 'semi,;,dot,.,comma,,'); + assert('{#keys}', '#semi,;,dot,.,comma,,'); + assert('{.keys}', '.semi,%3B,dot,.,comma,%2C'); + assert('{/keys}', '/semi,%3B,dot,.,comma,%2C'); + assert('{;keys}', ';keys=semi,%3B,dot,.,comma,%2C'); + assert('{?keys}', '?keys=semi,%3B,dot,.,comma,%2C'); + assert('{&keys}', '&keys=semi,%3B,dot,.,comma,%2C'); + }); + + it('variable list explode', function () { + assert('{list*}', 'red,green,blue'); + assert('{+list*}', 'red,green,blue'); + assert('{#list*}', '#red,green,blue'); + assert('{/list*}', '/red/green/blue'); + assert('{;list*}', ';list=red;list=green;list=blue'); + assert('{.list*}', '.red.green.blue'); + assert('{?list*}', '?list=red&list=green&list=blue'); + assert('{&list*}', '&list=red&list=green&list=blue'); + + assert('{/list*,path:4}', '/red/green/blue/%2Ffoo'); + }); + + it('variable associative array explode', function () { + assert('{+keys*}', 'semi=;,dot=.,comma=,'); + assert('{#keys*}', '#semi=;,dot=.,comma=,'); + assert('{/keys*}', '/semi=%3B/dot=./comma=%2C'); + assert('{;keys*}', ';semi=%3B;dot=.;comma=%2C'); + assert('{?keys*}', '?semi=%3B&dot=.&comma=%2C'); + assert('{&keys*}', '&semi=%3B&dot=.&comma=%2C') + }); + + it('encodes associative arrays correctly', function () { + assert('{chars*}', '%C3%BC=%C3%BC'); + }); + }); + + describe('Encoding', function () { + var assert = createTestContext({ + restricted: ":/?#[]@!$&()*+,;='", + percent: '%', + encoded: '%25', + 'pctencoded%20name': '', + mapWithEncodedName: { + 'encoded%20name': '' + }, + mapWithRestrictedName: { + 'restricted=name': '' + }, + mapWidthUmlautName: { + 'ümlaut': '' + } + }); + + it('passes through percent encoded values', function () { + assert('{percent}', '%25'); + assert('{+encoded}', '%25'); + }); + + it('encodes restricted characters correctly', function () { + assert('{restricted}', '%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + assert('{+restricted}', ':/?#[]@!$&()*+,;=\''); + assert('{#restricted}', '#:/?#[]@!$&()*+,;=\''); + assert('{/restricted}', '/%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + assert('{;restricted}', ';restricted=%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + assert('{.restricted}', '.%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + assert('{?restricted}', '?restricted=%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + assert('{&restricted}', '&restricted=%3A%2F%3F%23%5B%5D%40%21%24%26%28%29%2A%2B%2C%3B%3D%27'); + }); + }); + describe('Error handling (or the lack thereof)', function () { + var assert = createTestContext({ + foo: 'test', + keys: { + foo: 'bar' + } + }); + + it('does not expand invalid expressions', function () { + assert('{test', '{test'); + assert('test}', 'test}'); + assert('{{test}}', '{}'); // TODO: Is this acceptable? + }); + + it('does not expand with incorrect operators', function () { + assert('{@foo}', ''); // TODO: This will try to match a variable called `@foo` which will fail because it is not in our context. We could catch this by ignoring reserved operators? + assert('{$foo}', ''); // TODO: Same story, but $ is not a reserved operator. + assert('{++foo}', ''); + }); + + it('ignores incorrect prefixes', function () { + assert('{foo:test}', 'test'); // TODO: Invalid prefixes are ignored. We could throw an error. + assert('{foo:2test}', 'te'); // TODO: Best effort is OK? + }); + + it('prefix applied to the wrong context', function () { + assert('{keys:1}', 'foo,bar'); + }); + }); + describe('Skipping undefined arguments', function () { + var assert = createTestContext({ + 'var': 'value', + 'number': 2133, + 'emptystring': '', + 'emptylist': [], + 'emptyobject': {}, + 'undefinedlistitem': [1,,2], + }); + it('variable undefined list item', function () { + assert('{undefinedlistitem}', '1,2'); + assert('{undefinedlistitem*}', '1,2'); + assert('{?undefinedlistitem*}', '?undefinedlistitem=1&undefinedlistitem=2'); + }); + + it('query with empty/undefined arguments', function () { + assert('{?var,number}', '?var=value&number=2133'); + assert('{?undef}', ''); + assert('{?emptystring}', '?emptystring='); + assert('{?emptylist}', '?emptylist='); + assert('{?emptyobject}', '?emptyobject='); + assert('{?undef,var,emptystring}', '?var=value&emptystring='); + }); + }); +}); diff --git a/node_modules/url-template/uritemplate-test/README.md b/node_modules/url-template/uritemplate-test/README.md new file mode 100644 index 000000000..3eb519da6 --- /dev/null +++ b/node_modules/url-template/uritemplate-test/README.md @@ -0,0 +1,90 @@ + +URI Template Tests +================== + +This is a set of tests for implementations of +[RFC6570](http://tools.ietf.org/html/rfc6570) - URI Template. It is designed +to be reused by any implementation, to improve interoperability and +implementation quality. + +If your project uses Git for version control, you can make uritemplate-tests into a [submodule](http://help.github.com/submodules/). + +Test Format +----------- + +Each test file is a [JSON](http://tools.ietf.org/html/RFC6627) document +containing an object whose properties are groups of related tests. +Alternatively, all tests are available in XML as well, with the XML files +being generated by transform-json-tests.xslt which uses json2xml.xslt as a +general-purpose JSON-to-XML parsing library. + +Each group, in turn, is an object with three children: + +* level - the level of the tests covered, as per the RFC (optional; if absent, + assume level 4). +* variables - an object representing the variables that are available to the + tests in the suite +* testcases - a list of testcases, where each case is a two-member list, the + first being the template, the second being the result of expanding the + template with the provided variables. + +Note that the result string can be a few different things: + +* string - if the second member is a string, the result of expansion is + expected to match it, character-for-character. +* list - if the second member is a list of strings, the result of expansion + is expected to match one of them; this allows for templates that can + expand into different, equally-acceptable URIs. +* false - if the second member is boolean false, expansion is expected to + fail (i.e., the template was invalid). + +For example: + + { + "Level 1 Examples" : + { + "level": 1, + "variables": { + "var" : "value", + "hello" : "Hello World!" + }, + "testcases" : [ + ["{var}", "value"], + ["{hello}", "Hello%20World%21"] + ] + } + } + + +Tests Included +-------------- + +The following test files are included: + +* spec-examples.json - The complete set of example templates from the RFC +* spec-examples-by-section.json - The examples, section by section +* extended-tests.json - more complex test cases +* negative-tests.json - invalid templates + +For all these test files, XML versions with the names *.xml can be +generated with the transform-json-tests.xslt XSLT stylesheet. The XSLT +contains the names of the above test files as a parameter, and can be +started with any XML as input (i.e., the XML input is ignored). + +License +------- + + Copyright 2011-2012 The Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/node_modules/url-template/uritemplate-test/extended-tests.json b/node_modules/url-template/uritemplate-test/extended-tests.json new file mode 100644 index 000000000..fd6974449 --- /dev/null +++ b/node_modules/url-template/uritemplate-test/extended-tests.json @@ -0,0 +1,118 @@ +{ + "Additional Examples 1":{ + "level":4, + "variables":{ + "id" : "person", + "token" : "12345", + "fields" : ["id", "name", "picture"], + "format" : "json", + "q" : "URI Templates", + "page" : "5", + "lang" : "en", + "geocode" : ["37.76","-122.427"], + "first_name" : "John", + "last.name" : "Doe", + "Some%20Thing" : "foo", + "number" : 6, + "long" : 37.76, + "lat" : -122.427, + "group_id" : "12345", + "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }", + "uri" : "http://example.org/?uri=http%3A%2F%2Fexample.org%2F", + "word" : "drücken", + "Stra%C3%9Fe" : "Grüner Weg", + "random" : "šö䟜ñꀣ¥‡ÑÒÓÔÕÖ×ØÙÚàáâãäåæçÿ", + "assoc_special_chars" : + { "šö䟜ñꀣ¥‡ÑÒÓÔÕ" : "Ö×ØÙÚàáâãäåæçÿ" } + }, + "testcases":[ + + [ "{/id*}" , "/person" ], + [ "{/id*}{?fields,first_name,last.name,token}" , [ + "/person?fields=id,name,picture&first_name=John&last.name=Doe&token=12345", + "/person?fields=id,picture,name&first_name=John&last.name=Doe&token=12345", + "/person?fields=picture,name,id&first_name=John&last.name=Doe&token=12345", + "/person?fields=picture,id,name&first_name=John&last.name=Doe&token=12345", + "/person?fields=name,picture,id&first_name=John&last.name=Doe&token=12345", + "/person?fields=name,id,picture&first_name=John&last.name=Doe&token=12345"] + ], + ["/search.{format}{?q,geocode,lang,locale,page,result_type}", + [ "/search.json?q=URI%20Templates&geocode=37.76,-122.427&lang=en&page=5", + "/search.json?q=URI%20Templates&geocode=-122.427,37.76&lang=en&page=5"] + ], + ["/test{/Some%20Thing}", "/test/foo" ], + ["/set{?number}", "/set?number=6"], + ["/loc{?long,lat}" , "/loc?long=37.76&lat=-122.427"], + ["/base{/group_id,first_name}/pages{/page,lang}{?format,q}","/base/12345/John/pages/5/en?format=json&q=URI%20Templates"], + ["/sparql{?query}", "/sparql?query=PREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%20SELECT%20%3Fbook%20%3Fwho%20WHERE%20%7B%20%3Fbook%20dc%3Acreator%20%3Fwho%20%7D"], + ["/go{?uri}", "/go?uri=http%3A%2F%2Fexample.org%2F%3Furi%3Dhttp%253A%252F%252Fexample.org%252F"], + ["/service{?word}", "/service?word=dr%C3%BCcken"], + ["/lookup{?Stra%C3%9Fe}", "/lookup?Stra%C3%9Fe=Gr%C3%BCner%20Weg"], + ["{random}" , "%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"], + ["{?assoc_special_chars*}", "?%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95=%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"] + ] + }, + "Additional Examples 2":{ + "level":4, + "variables":{ + "id" : ["person","albums"], + "token" : "12345", + "fields" : ["id", "name", "picture"], + "format" : "atom", + "q" : "URI Templates", + "page" : "10", + "start" : "5", + "lang" : "en", + "geocode" : ["37.76","-122.427"] + }, + "testcases":[ + + [ "{/id*}" , ["/person/albums","/albums/person"] ], + [ "{/id*}{?fields,token}" , [ + "/person/albums?fields=id,name,picture&token=12345", + "/person/albums?fields=id,picture,name&token=12345", + "/person/albums?fields=picture,name,id&token=12345", + "/person/albums?fields=picture,id,name&token=12345", + "/person/albums?fields=name,picture,id&token=12345", + "/person/albums?fields=name,id,picture&token=12345", + "/albums/person?fields=id,name,picture&token=12345", + "/albums/person?fields=id,picture,name&token=12345", + "/albums/person?fields=picture,name,id&token=12345", + "/albums/person?fields=picture,id,name&token=12345", + "/albums/person?fields=name,picture,id&token=12345", + "/albums/person?fields=name,id,picture&token=12345"] + ] + ] + }, + "Additional Examples 3: Empty Variables":{ + "variables" : { + "empty_list" : [], + "empty_assoc" : {} + }, + "testcases":[ + [ "{/empty_list}", [ "" ] ], + [ "{/empty_list*}", [ "" ] ], + [ "{?empty_list}", [ ""] ], + [ "{?empty_list*}", [ "" ] ], + [ "{?empty_assoc}", [ "" ] ], + [ "{?empty_assoc*}", [ "" ] ] + ] + }, + "Additional Examples 4: Numeric Keys":{ + "variables" : { + "42" : "The Answer to the Ultimate Question of Life, the Universe, and Everything", + "1337" : ["leet", "as","it", "can","be"], + "german" : { + "11": "elf", + "12": "zwölf" + } + }, + "testcases":[ + [ "{42}", "The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"], + [ "{?42}", "?42=The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"], + [ "{1337}", "leet,as,it,can,be"], + [ "{?1337*}", "?1337=leet&1337=as&1337=it&1337=can&1337=be"], + [ "{?german*}", [ "?11=elf&12=zw%C3%B6lf", "?12=zw%C3%B6lf&11=elf"] ] + ] + } +} diff --git a/node_modules/url-template/uritemplate-test/json2xml.xslt b/node_modules/url-template/uritemplate-test/json2xml.xslt new file mode 100644 index 000000000..59b3548c0 --- /dev/null +++ b/node_modules/url-template/uritemplate-test/json2xml.xslt @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \b + + + + + + + + + + + \v + + + + + \f + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/url-template/uritemplate-test/negative-tests.json b/node_modules/url-template/uritemplate-test/negative-tests.json new file mode 100644 index 000000000..552a6bf07 --- /dev/null +++ b/node_modules/url-template/uritemplate-test/negative-tests.json @@ -0,0 +1,57 @@ +{ + "Failure Tests":{ + "level":4, + "variables":{ + "id" : "thing", + "var" : "value", + "hello" : "Hello World!", + "with space" : "fail", + " leading_space" : "Hi!", + "trailing_space " : "Bye!", + "empty" : "", + "path" : "/foo/bar", + "x" : "1024", + "y" : "768", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "example" : "red", + "searchTerms" : "uri templates", + "~thing" : "some-user", + "default-graph-uri" : ["http://www.example/book/","http://www.example/papers/"], + "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }" + + }, + "testcases":[ + [ "{/id*", false ], + [ "/id*}", false ], + [ "{/?id}", false ], + [ "{var:prefix}", false ], + [ "{hello:2*}", false ] , + [ "{??hello}", false ] , + [ "{!hello}", false ] , + [ "{with space}", false], + [ "{ leading_space}", false], + [ "{trailing_space }", false], + [ "{=path}", false ] , + [ "{$var}", false ], + [ "{|var*}", false ], + [ "{*keys?}", false ], + [ "{?empty=default,var}", false ], + [ "{var}{-prefix|/-/|var}" , false ], + [ "?q={searchTerms}&c={example:color?}" , false ], + [ "x{?empty|foo=none}" , false ], + [ "/h{#hello+}" , false ], + [ "/h#{hello+}" , false ], + [ "{keys:1}", false ], + [ "{+keys:1}", false ], + [ "{;keys:1*}", false ], + [ "?{-join|&|var,list}" , false ], + [ "/people/{~thing}", false], + [ "/{default-graph-uri}", false ], + [ "/sparql{?query,default-graph-uri}", false ], + [ "/sparql{?query){&default-graph-uri*}", false ], + [ "/resolution{?x, y}" , false ] + + ] + } +} \ No newline at end of file diff --git a/node_modules/url-template/uritemplate-test/spec-examples-by-section.json b/node_modules/url-template/uritemplate-test/spec-examples-by-section.json new file mode 100644 index 000000000..5aef18205 --- /dev/null +++ b/node_modules/url-template/uritemplate-test/spec-examples-by-section.json @@ -0,0 +1,439 @@ +{ + "3.2.1 Variable Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{count}", "one,two,three"], + ["{count*}", "one,two,three"], + ["{/count}", "/one,two,three"], + ["{/count*}", "/one/two/three"], + ["{;count}", ";count=one,two,three"], + ["{;count*}", ";count=one;count=two;count=three"], + ["{?count}", "?count=one,two,three"], + ["{?count*}", "?count=one&count=two&count=three"], + ["{&count*}", "&count=one&count=two&count=three"] + ] + }, + "3.2.2 Simple String Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{var}", "value"], + ["{hello}", "Hello%20World%21"], + ["{half}", "50%25"], + ["O{empty}X", "OX"], + ["O{undef}X", "OX"], + ["{x,y}", "1024,768"], + ["{x,hello,y}", "1024,Hello%20World%21,768"], + ["?{x,empty}", "?1024,"], + ["?{x,undef}", "?1024"], + ["?{undef,y}", "?768"], + ["{var:3}", "val"], + ["{var:30}", "value"], + ["{list}", "red,green,blue"], + ["{list*}", "red,green,blue"], + ["{keys}", [ + "comma,%2C,dot,.,semi,%3B", + "comma,%2C,semi,%3B,dot,.", + "dot,.,comma,%2C,semi,%3B", + "dot,.,semi,%3B,comma,%2C", + "semi,%3B,comma,%2C,dot,.", + "semi,%3B,dot,.,comma,%2C" + ]], + ["{keys*}", [ + "comma=%2C,dot=.,semi=%3B", + "comma=%2C,semi=%3B,dot=.", + "dot=.,comma=%2C,semi=%3B", + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,comma=%2C,dot=.", + "semi=%3B,dot=.,comma=%2C" + ]] + ] + }, + "3.2.3 Reserved Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{+var}", "value"], + ["{/var,empty}", "/value/"], + ["{/var,undef}", "/value"], + ["{+hello}", "Hello%20World!"], + ["{+half}", "50%25"], + ["{base}index", "http%3A%2F%2Fexample.com%2Fhome%2Findex"], + ["{+base}index", "http://example.com/home/index"], + ["O{+empty}X", "OX"], + ["O{+undef}X", "OX"], + ["{+path}/here", "/foo/bar/here"], + ["{+path:6}/here", "/foo/b/here"], + ["here?ref={+path}", "here?ref=/foo/bar"], + ["up{+path}{var}/here", "up/foo/barvalue/here"], + ["{+x,hello,y}", "1024,Hello%20World!,768"], + ["{+path,x}/here", "/foo/bar,1024/here"], + ["{+list}", "red,green,blue"], + ["{+list*}", "red,green,blue"], + ["{+keys}", [ + "comma,,,dot,.,semi,;", + "comma,,,semi,;,dot,.", + "dot,.,comma,,,semi,;", + "dot,.,semi,;,comma,,", + "semi,;,comma,,,dot,.", + "semi,;,dot,.,comma,," + ]], + ["{+keys*}", [ + "comma=,,dot=.,semi=;", + "comma=,,semi=;,dot=.", + "dot=.,comma=,,semi=;", + "dot=.,semi=;,comma=,", + "semi=;,comma=,,dot=.", + "semi=;,dot=.,comma=," + ]] + ] + }, + "3.2.4 Fragment Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{#var}", "#value"], + ["{#hello}", "#Hello%20World!"], + ["{#half}", "#50%25"], + ["foo{#empty}", "foo#"], + ["foo{#undef}", "foo"], + ["{#x,hello,y}", "#1024,Hello%20World!,768"], + ["{#path,x}/here", "#/foo/bar,1024/here"], + ["{#path:6}/here", "#/foo/b/here"], + ["{#list}", "#red,green,blue"], + ["{#list*}", "#red,green,blue"], + ["{#keys}", [ + "#comma,,,dot,.,semi,;", + "#comma,,,semi,;,dot,.", + "#dot,.,comma,,,semi,;", + "#dot,.,semi,;,comma,,", + "#semi,;,comma,,,dot,.", + "#semi,;,dot,.,comma,," + ]] + ] + }, + "3.2.5 Label Expansion with Dot-Prefix" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{.who}", ".fred"], + ["{.who,who}", ".fred.fred"], + ["{.half,who}", ".50%25.fred"], + ["www{.dom*}", "www.example.com"], + ["X{.var}", "X.value"], + ["X{.var:3}", "X.val"], + ["X{.empty}", "X."], + ["X{.undef}", "X"], + ["X{.list}", "X.red,green,blue"], + ["X{.list*}", "X.red.green.blue"], + ["{#keys}", [ + "#comma,,,dot,.,semi,;", + "#comma,,,semi,;,dot,.", + "#dot,.,comma,,,semi,;", + "#dot,.,semi,;,comma,,", + "#semi,;,comma,,,dot,.", + "#semi,;,dot,.,comma,," + ]], + ["{#keys*}", [ + "#comma=,,dot=.,semi=;", + "#comma=,,semi=;,dot=.", + "#dot=.,comma=,,semi=;", + "#dot=.,semi=;,comma=,", + "#semi=;,comma=,,dot=.", + "#semi=;,dot=.,comma=," + ]], + ["X{.empty_keys}", "X"], + ["X{.empty_keys*}", "X"] + ] + }, + "3.2.6 Path Segment Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{/who}", "/fred"], + ["{/who,who}", "/fred/fred"], + ["{/half,who}", "/50%25/fred"], + ["{/who,dub}", "/fred/me%2Ftoo"], + ["{/var}", "/value"], + ["{/var,empty}", "/value/"], + ["{/var,undef}", "/value"], + ["{/var,x}/here", "/value/1024/here"], + ["{/var:1,var}", "/v/value"], + ["{/list}", "/red,green,blue"], + ["{/list*}", "/red/green/blue"], + ["{/list*,path:4}", "/red/green/blue/%2Ffoo"], + ["{/keys}", [ + "/comma,%2C,dot,.,semi,%3B", + "/comma,%2C,semi,%3B,dot,.", + "/dot,.,comma,%2C,semi,%3B", + "/dot,.,semi,%3B,comma,%2C", + "/semi,%3B,comma,%2C,dot,.", + "/semi,%3B,dot,.,comma,%2C" + ]], + ["{/keys*}", [ + "/comma=%2C/dot=./semi=%3B", + "/comma=%2C/semi=%3B/dot=.", + "/dot=./comma=%2C/semi=%3B", + "/dot=./semi=%3B/comma=%2C", + "/semi=%3B/comma=%2C/dot=.", + "/semi=%3B/dot=./comma=%2C" + ]] + ] + }, + "3.2.7 Path-Style Parameter Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{;who}", ";who=fred"], + ["{;half}", ";half=50%25"], + ["{;empty}", ";empty"], + ["{;hello:5}", ";hello=Hello"], + ["{;v,empty,who}", ";v=6;empty;who=fred"], + ["{;v,bar,who}", ";v=6;who=fred"], + ["{;x,y}", ";x=1024;y=768"], + ["{;x,y,empty}", ";x=1024;y=768;empty"], + ["{;x,y,undef}", ";x=1024;y=768"], + ["{;list}", ";list=red,green,blue"], + ["{;list*}", ";list=red;list=green;list=blue"], + ["{;keys}", [ + ";keys=comma,%2C,dot,.,semi,%3B", + ";keys=comma,%2C,semi,%3B,dot,.", + ";keys=dot,.,comma,%2C,semi,%3B", + ";keys=dot,.,semi,%3B,comma,%2C", + ";keys=semi,%3B,comma,%2C,dot,.", + ";keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{;keys*}", [ + ";comma=%2C;dot=.;semi=%3B", + ";comma=%2C;semi=%3B;dot=.", + ";dot=.;comma=%2C;semi=%3B", + ";dot=.;semi=%3B;comma=%2C", + ";semi=%3B;comma=%2C;dot=.", + ";semi=%3B;dot=.;comma=%2C" + ]] + ] + }, + "3.2.8 Form-Style Query Expansion" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{?who}", "?who=fred"], + ["{?half}", "?half=50%25"], + ["{?x,y}", "?x=1024&y=768"], + ["{?x,y,empty}", "?x=1024&y=768&empty="], + ["{?x,y,undef}", "?x=1024&y=768"], + ["{?var:3}", "?var=val"], + ["{?list}", "?list=red,green,blue"], + ["{?list*}", "?list=red&list=green&list=blue"], + ["{?keys}", [ + "?keys=comma,%2C,dot,.,semi,%3B", + "?keys=comma,%2C,semi,%3B,dot,.", + "?keys=dot,.,comma,%2C,semi,%3B", + "?keys=dot,.,semi,%3B,comma,%2C", + "?keys=semi,%3B,comma,%2C,dot,.", + "?keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{?keys*}", [ + "?comma=%2C&dot=.&semi=%3B", + "?comma=%2C&semi=%3B&dot=.", + "?dot=.&comma=%2C&semi=%3B", + "?dot=.&semi=%3B&comma=%2C", + "?semi=%3B&comma=%2C&dot=.", + "?semi=%3B&dot=.&comma=%2C" + ]] + ] + }, + "3.2.9 Form-Style Query Continuation" : + { + "variables": { + "count" : ["one", "two", "three"], + "dom" : ["example", "com"], + "dub" : "me/too", + "hello" : "Hello World!", + "half" : "50%", + "var" : "value", + "who" : "fred", + "base" : "http://example.com/home/", + "path" : "/foo/bar", + "list" : ["red", "green", "blue"], + "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, + "v" : "6", + "x" : "1024", + "y" : "768", + "empty" : "", + "empty_keys" : [], + "undef" : null + }, + "testcases" : [ + ["{&who}", "&who=fred"], + ["{&half}", "&half=50%25"], + ["?fixed=yes{&x}", "?fixed=yes&x=1024"], + ["{&var:3}", "&var=val"], + ["{&x,y,empty}", "&x=1024&y=768&empty="], + ["{&x,y,undef}", "&x=1024&y=768"], + ["{&list}", "&list=red,green,blue"], + ["{&list*}", "&list=red&list=green&list=blue"], + ["{&keys}", [ + "&keys=comma,%2C,dot,.,semi,%3B", + "&keys=comma,%2C,semi,%3B,dot,.", + "&keys=dot,.,comma,%2C,semi,%3B", + "&keys=dot,.,semi,%3B,comma,%2C", + "&keys=semi,%3B,comma,%2C,dot,.", + "&keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{&keys*}", [ + "&comma=%2C&dot=.&semi=%3B", + "&comma=%2C&semi=%3B&dot=.", + "&dot=.&comma=%2C&semi=%3B", + "&dot=.&semi=%3B&comma=%2C", + "&semi=%3B&comma=%2C&dot=.", + "&semi=%3B&dot=.&comma=%2C" + ]] + ] + } +} diff --git a/node_modules/url-template/uritemplate-test/spec-examples.json b/node_modules/url-template/uritemplate-test/spec-examples.json new file mode 100644 index 000000000..2e8e942da --- /dev/null +++ b/node_modules/url-template/uritemplate-test/spec-examples.json @@ -0,0 +1,218 @@ +{ + "Level 1 Examples" : + { + "level": 1, + "variables": { + "var" : "value", + "hello" : "Hello World!" + }, + "testcases" : [ + ["{var}", "value"], + ["{hello}", "Hello%20World%21"] + ] + }, + "Level 2 Examples" : + { + "level": 2, + "variables": { + "var" : "value", + "hello" : "Hello World!", + "path" : "/foo/bar" + }, + "testcases" : [ + ["{+var}", "value"], + ["{+hello}", "Hello%20World!"], + ["{+path}/here", "/foo/bar/here"], + ["here?ref={+path}", "here?ref=/foo/bar"] + ] + }, + "Level 3 Examples" : + { + "level": 3, + "variables": { + "var" : "value", + "hello" : "Hello World!", + "empty" : "", + "path" : "/foo/bar", + "x" : "1024", + "y" : "768" + }, + "testcases" : [ + ["map?{x,y}", "map?1024,768"], + ["{x,hello,y}", "1024,Hello%20World%21,768"], + ["{+x,hello,y}", "1024,Hello%20World!,768"], + ["{+path,x}/here", "/foo/bar,1024/here"], + ["{#x,hello,y}", "#1024,Hello%20World!,768"], + ["{#path,x}/here", "#/foo/bar,1024/here"], + ["X{.var}", "X.value"], + ["X{.x,y}", "X.1024.768"], + ["{/var}", "/value"], + ["{/var,x}/here", "/value/1024/here"], + ["{;x,y}", ";x=1024;y=768"], + ["{;x,y,empty}", ";x=1024;y=768;empty"], + ["{?x,y}", "?x=1024&y=768"], + ["{?x,y,empty}", "?x=1024&y=768&empty="], + ["?fixed=yes{&x}", "?fixed=yes&x=1024"], + ["{&x,y,empty}", "&x=1024&y=768&empty="] + ] + }, + "Level 4 Examples" : + { + "level": 4, + "variables": { + "var": "value", + "hello": "Hello World!", + "path": "/foo/bar", + "list": ["red", "green", "blue"], + "keys": {"semi": ";", "dot": ".", "comma":","} + }, + "testcases": [ + ["{var:3}", "val"], + ["{var:30}", "value"], + ["{list}", "red,green,blue"], + ["{list*}", "red,green,blue"], + ["{keys}", [ + "comma,%2C,dot,.,semi,%3B", + "comma,%2C,semi,%3B,dot,.", + "dot,.,comma,%2C,semi,%3B", + "dot,.,semi,%3B,comma,%2C", + "semi,%3B,comma,%2C,dot,.", + "semi,%3B,dot,.,comma,%2C" + ]], + ["{keys*}", [ + "comma=%2C,dot=.,semi=%3B", + "comma=%2C,semi=%3B,dot=.", + "dot=.,comma=%2C,semi=%3B", + "dot=.,semi=%3B,comma=%2C", + "semi=%3B,comma=%2C,dot=.", + "semi=%3B,dot=.,comma=%2C" + ]], + ["{+path:6}/here", "/foo/b/here"], + ["{+list}", "red,green,blue"], + ["{+list*}", "red,green,blue"], + ["{+keys}", [ + "comma,,,dot,.,semi,;", + "comma,,,semi,;,dot,.", + "dot,.,comma,,,semi,;", + "dot,.,semi,;,comma,,", + "semi,;,comma,,,dot,.", + "semi,;,dot,.,comma,," + ]], + ["{+keys*}", [ + "comma=,,dot=.,semi=;", + "comma=,,semi=;,dot=.", + "dot=.,comma=,,semi=;", + "dot=.,semi=;,comma=,", + "semi=;,comma=,,dot=.", + "semi=;,dot=.,comma=," + ]], + ["{#path:6}/here", "#/foo/b/here"], + ["{#list}", "#red,green,blue"], + ["{#list*}", "#red,green,blue"], + ["{#keys}", [ + "#comma,,,dot,.,semi,;", + "#comma,,,semi,;,dot,.", + "#dot,.,comma,,,semi,;", + "#dot,.,semi,;,comma,,", + "#semi,;,comma,,,dot,.", + "#semi,;,dot,.,comma,," + ]], + ["{#keys*}", [ + "#comma=,,dot=.,semi=;", + "#comma=,,semi=;,dot=.", + "#dot=.,comma=,,semi=;", + "#dot=.,semi=;,comma=,", + "#semi=;,comma=,,dot=.", + "#semi=;,dot=.,comma=," + ]], + ["X{.var:3}", "X.val"], + ["X{.list}", "X.red,green,blue"], + ["X{.list*}", "X.red.green.blue"], + ["X{.keys}", [ + "X.comma,%2C,dot,.,semi,%3B", + "X.comma,%2C,semi,%3B,dot,.", + "X.dot,.,comma,%2C,semi,%3B", + "X.dot,.,semi,%3B,comma,%2C", + "X.semi,%3B,comma,%2C,dot,.", + "X.semi,%3B,dot,.,comma,%2C" + ]], + ["{/var:1,var}", "/v/value"], + ["{/list}", "/red,green,blue"], + ["{/list*}", "/red/green/blue"], + ["{/list*,path:4}", "/red/green/blue/%2Ffoo"], + ["{/keys}", [ + "/comma,%2C,dot,.,semi,%3B", + "/comma,%2C,semi,%3B,dot,.", + "/dot,.,comma,%2C,semi,%3B", + "/dot,.,semi,%3B,comma,%2C", + "/semi,%3B,comma,%2C,dot,.", + "/semi,%3B,dot,.,comma,%2C" + ]], + ["{/keys*}", [ + "/comma=%2C/dot=./semi=%3B", + "/comma=%2C/semi=%3B/dot=.", + "/dot=./comma=%2C/semi=%3B", + "/dot=./semi=%3B/comma=%2C", + "/semi=%3B/comma=%2C/dot=.", + "/semi=%3B/dot=./comma=%2C" + ]], + ["{;hello:5}", ";hello=Hello"], + ["{;list}", ";list=red,green,blue"], + ["{;list*}", ";list=red;list=green;list=blue"], + ["{;keys}", [ + ";keys=comma,%2C,dot,.,semi,%3B", + ";keys=comma,%2C,semi,%3B,dot,.", + ";keys=dot,.,comma,%2C,semi,%3B", + ";keys=dot,.,semi,%3B,comma,%2C", + ";keys=semi,%3B,comma,%2C,dot,.", + ";keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{;keys*}", [ + ";comma=%2C;dot=.;semi=%3B", + ";comma=%2C;semi=%3B;dot=.", + ";dot=.;comma=%2C;semi=%3B", + ";dot=.;semi=%3B;comma=%2C", + ";semi=%3B;comma=%2C;dot=.", + ";semi=%3B;dot=.;comma=%2C" + ]], + ["{?var:3}", "?var=val"], + ["{?list}", "?list=red,green,blue"], + ["{?list*}", "?list=red&list=green&list=blue"], + ["{?keys}", [ + "?keys=comma,%2C,dot,.,semi,%3B", + "?keys=comma,%2C,semi,%3B,dot,.", + "?keys=dot,.,comma,%2C,semi,%3B", + "?keys=dot,.,semi,%3B,comma,%2C", + "?keys=semi,%3B,comma,%2C,dot,.", + "?keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{?keys*}", [ + "?comma=%2C&dot=.&semi=%3B", + "?comma=%2C&semi=%3B&dot=.", + "?dot=.&comma=%2C&semi=%3B", + "?dot=.&semi=%3B&comma=%2C", + "?semi=%3B&comma=%2C&dot=.", + "?semi=%3B&dot=.&comma=%2C" + ]], + ["{&var:3}", "&var=val"], + ["{&list}", "&list=red,green,blue"], + ["{&list*}", "&list=red&list=green&list=blue"], + ["{&keys}", [ + "&keys=comma,%2C,dot,.,semi,%3B", + "&keys=comma,%2C,semi,%3B,dot,.", + "&keys=dot,.,comma,%2C,semi,%3B", + "&keys=dot,.,semi,%3B,comma,%2C", + "&keys=semi,%3B,comma,%2C,dot,.", + "&keys=semi,%3B,dot,.,comma,%2C" + ]], + ["{&keys*}", [ + "&comma=%2C&dot=.&semi=%3B", + "&comma=%2C&semi=%3B&dot=.", + "&dot=.&comma=%2C&semi=%3B", + "&dot=.&semi=%3B&comma=%2C", + "&semi=%3B&comma=%2C&dot=.", + "&semi=%3B&dot=.&comma=%2C" + ]] + ] + } +} diff --git a/node_modules/url-template/uritemplate-test/transform-json-tests.xslt b/node_modules/url-template/uritemplate-test/transform-json-tests.xslt new file mode 100644 index 000000000..d956b6bdb --- /dev/null +++ b/node_modules/url-template/uritemplate-test/transform-json-tests.xslt @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/which/CHANGELOG.md b/node_modules/which/CHANGELOG.md new file mode 100644 index 000000000..3d83d2694 --- /dev/null +++ b/node_modules/which/CHANGELOG.md @@ -0,0 +1,152 @@ +# Changes + + +## 1.3.1 + +* update deps +* update travis + +## v1.3.0 + +* Add nothrow option to which.sync +* update tap + +## v1.2.14 + +* appveyor: drop node 5 and 0.x +* travis-ci: add node 6, drop 0.x + +## v1.2.13 + +* test: Pass missing option to pass on windows +* update tap +* update isexe to 2.0.0 +* neveragain.tech pledge request + +## v1.2.12 + +* Removed unused require + +## v1.2.11 + +* Prevent changelog script from being included in package + +## v1.2.10 + +* Use env.PATH only, not env.Path + +## v1.2.9 + +* fix for paths starting with ../ +* Remove unused `is-absolute` module + +## v1.2.8 + +* bullet items in changelog that contain (but don't start with) # + +## v1.2.7 + +* strip 'update changelog' changelog entries out of changelog + +## v1.2.6 + +* make the changelog bulleted + +## v1.2.5 + +* make a changelog, and keep it up to date +* don't include tests in package +* Properly handle relative-path executables +* appveyor +* Attach error code to Not Found error +* Make tests pass on Windows + +## v1.2.4 + +* Fix typo + +## v1.2.3 + +* update isexe, fix regression in pathExt handling + +## v1.2.2 + +* update deps, use isexe module, test windows + +## v1.2.1 + +* Sometimes windows PATH entries are quoted +* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. +* doc cli + +## v1.2.0 + +* Add support for opt.all and -as cli flags +* test the bin +* update travis +* Allow checking for multiple programs in bin/which +* tap 2 + +## v1.1.2 + +* travis +* Refactored and fixed undefined error on Windows +* Support strict mode + +## v1.1.1 + +* test +g exes against secondary groups, if available +* Use windows exe semantics on cygwin & msys +* cwd should be first in path on win32, not last +* Handle lower-case 'env.Path' on Windows +* Update docs +* use single-quotes + +## v1.1.0 + +* Add tests, depend on is-absolute + +## v1.0.9 + +* which.js: root is allowed to execute files owned by anyone + +## v1.0.8 + +* don't use graceful-fs + +## v1.0.7 + +* add license to package.json + +## v1.0.6 + +* isc license + +## 1.0.5 + +* Awful typo + +## 1.0.4 + +* Test for path absoluteness properly +* win: Allow '' as a pathext if cmd has a . in it + +## 1.0.3 + +* Remove references to execPath +* Make `which.sync()` work on Windows by honoring the PATHEXT variable. +* Make `isExe()` always return true on Windows. +* MIT + +## 1.0.2 + +* Only files can be exes + +## 1.0.1 + +* Respect the PATHEXT env for win32 support +* should 0755 the bin +* binary +* guts +* package +* 1st diff --git a/node_modules/which/LICENSE b/node_modules/which/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/which/README.md b/node_modules/which/README.md new file mode 100644 index 000000000..8c0b0cbf7 --- /dev/null +++ b/node_modules/which/README.md @@ -0,0 +1,51 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// if nothrow option is used, returns null if not found +resolved = which.sync('node', {nothrow: true}) + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/node_modules/which/bin/which b/node_modules/which/bin/which new file mode 100644 index 000000000..7cee3729e --- /dev/null +++ b/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/node_modules/which/package.json b/node_modules/which/package.json new file mode 100644 index 000000000..30edc4b1a --- /dev/null +++ b/node_modules/which/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "which@1.3.1", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "which@1.3.1", + "_id": "which@1.3.1", + "_inBundle": false, + "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "_location": "/which", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "which@1.3.1", + "name": "which", + "escapedName": "which", + "rawSpec": "1.3.1", + "saveSpec": null, + "fetchSpec": "1.3.1" + }, + "_requiredBy": [ + "/cross-spawn", + "/node-notifier" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "_spec": "1.3.1", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "./bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "dependencies": { + "isexe": "^2.0.0" + }, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.6.2", + "tap": "^12.0.1" + }, + "files": [ + "which.js", + "bin/which" + ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.3.1" +} diff --git a/node_modules/which/which.js b/node_modules/which/which.js new file mode 100644 index 000000000..4347f91a1 --- /dev/null +++ b/node_modules/which/which.js @@ -0,0 +1,135 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} diff --git a/node_modules/windows-release/index.d.ts b/node_modules/windows-release/index.d.ts new file mode 100644 index 000000000..6a9c44f66 --- /dev/null +++ b/node_modules/windows-release/index.d.ts @@ -0,0 +1,30 @@ +/** +Get the name of a Windows version from the release number: `5.1.2600` → `XP`. + +@param release - By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + +@example +``` +import * as os from 'os'; +import windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` +*/ +declare function windowsRelease(release?: string): string; + +export = windowsRelease; diff --git a/node_modules/windows-release/index.js b/node_modules/windows-release/index.js new file mode 100644 index 000000000..cb9ea9f00 --- /dev/null +++ b/node_modules/windows-release/index.js @@ -0,0 +1,44 @@ +'use strict'; +const os = require('os'); +const execa = require('execa'); + +// Reference: https://www.gaijin.at/en/lstwinver.php +const names = new Map([ + ['10.0', '10'], + ['6.3', '8.1'], + ['6.2', '8'], + ['6.1', '7'], + ['6.0', 'Vista'], + ['5.2', 'Server 2003'], + ['5.1', 'XP'], + ['5.0', '2000'], + ['4.9', 'ME'], + ['4.1', '98'], + ['4.0', '95'] +]); + +const windowsRelease = release => { + const version = /\d+\.\d/.exec(release || os.release()); + + if (release && !version) { + throw new Error('`release` argument doesn\'t match `n.n`'); + } + + const ver = (version || [])[0]; + + // Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime. + // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version + // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx + // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. + if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { + const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; + const year = (stdout.match(/2008|2012|2016/) || [])[0]; + if (year) { + return `Server ${year}`; + } + } + + return names.get(ver); +}; + +module.exports = windowsRelease; diff --git a/node_modules/windows-release/license b/node_modules/windows-release/license new file mode 100644 index 000000000..e7af2f771 --- /dev/null +++ b/node_modules/windows-release/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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/node_modules/windows-release/package.json b/node_modules/windows-release/package.json new file mode 100644 index 000000000..d96d789d6 --- /dev/null +++ b/node_modules/windows-release/package.json @@ -0,0 +1,75 @@ +{ + "_from": "windows-release@^3.1.0", + "_id": "windows-release@3.2.0", + "_inBundle": false, + "_integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==", + "_location": "/windows-release", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "windows-release@^3.1.0", + "name": "windows-release", + "escapedName": "windows-release", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/os-name" + ], + "_resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz", + "_shasum": "8122dad5afc303d833422380680a79cdfa91785f", + "_spec": "windows-release@^3.1.0", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\os-name", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/windows-release/issues" + }, + "bundleDependencies": false, + "dependencies": { + "execa": "^1.0.0" + }, + "deprecated": false, + "description": "Get the name of a Windows version from the release number: `5.1.2600` → `XP`", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/windows-release#readme", + "keywords": [ + "os", + "win", + "win32", + "windows", + "operating", + "system", + "platform", + "name", + "title", + "release", + "version" + ], + "license": "MIT", + "name": "windows-release", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/windows-release.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.2.0" +} diff --git a/node_modules/windows-release/readme.md b/node_modules/windows-release/readme.md new file mode 100644 index 000000000..66557eabb --- /dev/null +++ b/node_modules/windows-release/readme.md @@ -0,0 +1,56 @@ +# windows-release [![Build Status](https://travis-ci.org/sindresorhus/windows-release.svg?branch=master)](https://travis-ci.org/sindresorhus/windows-release) + +> Get the name of a Windows version from the release number: `5.1.2600` → `XP` + + +## Install + +``` +$ npm install windows-release +``` + + +## Usage + +```js +const os = require('os'); +const windowsRelease = require('windows-release'); + +// On a Windows XP system + +windowsRelease(); +//=> 'XP' + +os.release(); +//=> '5.1.2600' + +windowsRelease(os.release()); +//=> 'XP' + +windowsRelease('4.9.3000'); +//=> 'ME' +``` + + +## API + +### windowsRelease([release]) + +#### release + +Type: `string` + +By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). + +Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. + + +## Related + +- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system +- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/wrappy/LICENSE b/node_modules/wrappy/LICENSE new file mode 100644 index 000000000..19129e315 --- /dev/null +++ b/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/wrappy/README.md b/node_modules/wrappy/README.md new file mode 100644 index 000000000..98eab2522 --- /dev/null +++ b/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/node_modules/wrappy/package.json b/node_modules/wrappy/package.json new file mode 100644 index 000000000..22ed91284 --- /dev/null +++ b/node_modules/wrappy/package.json @@ -0,0 +1,63 @@ +{ + "_args": [ + [ + "wrappy@1.0.2", + "C:\\Users\\Administrator\\Documents\\setup-node" + ] + ], + "_development": true, + "_from": "wrappy@1.0.2", + "_id": "wrappy@1.0.2", + "_inBundle": false, + "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "_location": "/wrappy", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "wrappy@1.0.2", + "name": "wrappy", + "escapedName": "wrappy", + "rawSpec": "1.0.2", + "saveSpec": null, + "fetchSpec": "1.0.2" + }, + "_requiredBy": [ + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_spec": "1.0.2", + "_where": "C:\\Users\\Administrator\\Documents\\setup-node", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "files": [ + "wrappy.js" + ], + "homepage": "https://github.com/npm/wrappy", + "license": "ISC", + "main": "wrappy.js", + "name": "wrappy", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/wrappy/wrappy.js b/node_modules/wrappy/wrappy.js new file mode 100644 index 000000000..bb7e7d6fc --- /dev/null +++ b/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/package-lock.json b/package-lock.json index 45b1a2978..b4d45e88f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "setup-node", - "version": "1.0.4", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -19,6 +19,14 @@ "version": "file:toolkit/actions-exit-0.0.0.tgz", "integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw==" }, + "@actions/github": { + "version": "file:toolkit/actions-github-0.0.0.tgz", + "integrity": "sha512-CByX5VIagC5BqGwsHD9Qt5MfN+H6GDC9qQl+MIUipaHTc89sUG/vAY/xQDS9vxuuRwrxbdERwKO3dR6U1BSziw==", + "requires": { + "@octokit/graphql": "^2.0.1", + "@octokit/rest": "^16.15.0" + } + }, "@actions/io": { "version": "file:toolkit/actions-io-0.0.0.tgz", "integrity": "sha512-MZUGyOe6m26Ns6ZQnr2JvxXzlwZ33XWYG392b5YuPMim1CE8DbuiBHtqOZeHVm5PenS4fRUG3qMTiMymve1DUA==" @@ -452,6 +460,125 @@ "@types/yargs": "^12.0.9" } }, + "@octokit/endpoint": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.2.tgz", + "integrity": "sha512-gRjteEM9I6f4D8vtwU2iGUTn9RX/AJ0SVXiqBUEuYEWVGGAVjSXdT0oNmghH5lvQNWs8mwt6ZaultuG6yXivNw==", + "requires": { + "deepmerge": "4.0.0", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^3.0.0", + "url-template": "^2.0.8" + }, + "dependencies": { + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==" + }, + "universal-user-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "requires": { + "os-name": "^3.0.0" + } + } + } + }, + "@octokit/graphql": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz", + "integrity": "sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==", + "requires": { + "@octokit/request": "^5.0.0", + "universal-user-agent": "^2.0.3" + } + }, + "@octokit/request": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.0.2.tgz", + "integrity": "sha512-z1BQr43g4kOL4ZrIVBMHwi68Yg9VbkRUyuAgqCp1rU3vbYa69+2gIld/+gHclw15bJWQnhqqyEb7h5a5EqgZ0A==", + "requires": { + "@octokit/endpoint": "^5.1.0", + "@octokit/request-error": "^1.0.1", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^3.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==" + }, + "universal-user-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "requires": { + "os-name": "^3.0.0" + } + } + } + }, + "@octokit/request-error": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz", + "integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==", + "requires": { + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/rest": { + "version": "16.28.7", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.7.tgz", + "integrity": "sha512-cznFSLEhh22XD3XeqJw51OLSfyL2fcFKUO+v2Ep9MTAFfFLS1cK1Zwd1yEgQJmJoDnj4/vv3+fGGZweG+xsbIA==", + "requires": { + "@octokit/request": "^5.0.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^3.0.0", + "url-template": "^2.0.8" + }, + "dependencies": { + "universal-user-agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz", + "integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==", + "requires": { + "os-name": "^3.0.0" + } + } + } + }, "@types/babel__core": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz", @@ -726,6 +853,11 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "atob-lite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -861,6 +993,11 @@ "tweetnacl": "^0.14.3" } }, + "before-after-hook": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -941,6 +1078,11 @@ "node-int64": "^0.4.0" } }, + "btoa-lite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1179,7 +1321,6 @@ "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -1191,8 +1332,7 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" } } }, @@ -1271,6 +1411,11 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz", + "integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww==" + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1327,6 +1472,11 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", @@ -1362,7 +1512,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -1456,7 +1605,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -2268,7 +2416,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, "requires": { "pump": "^3.0.0" } @@ -2679,8 +2826,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-symbol": { "version": "1.0.2", @@ -2718,8 +2864,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -3471,12 +3616,27 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3486,6 +3646,11 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "macos-release": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==" + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -3711,8 +3876,12 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "node-int64": { "version": "0.4.0", @@ -3780,7 +3949,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, "requires": { "path-key": "^2.0.0" } @@ -3868,11 +4036,15 @@ "isobject": "^3.0.1" } }, + "octokit-pagination-methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } @@ -3928,6 +4100,15 @@ "mem": "^4.0.0" } }, + "os-name": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + } + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -3946,8 +4127,7 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-is-promise": { "version": "2.1.0", @@ -4022,8 +4202,7 @@ "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.6", @@ -4177,7 +4356,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4511,7 +4689,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -4519,8 +4696,7 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shellwords": { "version": "0.1.1", @@ -4531,8 +4707,7 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "sisteransi": { "version": "1.0.0", @@ -4872,8 +5047,7 @@ "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "supports-color": { "version": "5.5.0", @@ -5105,6 +5279,14 @@ "set-value": "^2.0.1" } }, + "universal-user-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz", + "integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==", + "requires": { + "os-name": "^3.0.0" + } + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -5160,6 +5342,11 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, + "url-template": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", + "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=" + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -5262,7 +5449,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -5273,6 +5459,14 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "windows-release": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz", + "integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==", + "requires": { + "execa": "^1.0.0" + } + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -5329,8 +5523,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "2.4.1", diff --git a/package.json b/package.json index ba1d9d1f4..5a22cd25c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-node", - "version": "1.0.4", + "version": "1.0.0", "private": true, "description": "setup node action", "main": "lib/setup-node.js", @@ -25,6 +25,7 @@ "@actions/core": "file:toolkit/actions-core-0.0.0.tgz", "@actions/exec": "file:toolkit/actions-exec-0.0.0.tgz", "@actions/exit": "file:toolkit/actions-exit-0.0.0.tgz", + "@actions/github": "file:toolkit/actions-github-0.0.0.tgz", "@actions/io": "file:toolkit/actions-io-0.0.0.tgz", "@actions/tool-cache": "file:toolkit/actions-tool-cache-0.0.0.tgz", "semver": "^6.1.1" diff --git a/src/authutil.ts b/src/authutil.ts new file mode 100644 index 000000000..c896339c9 --- /dev/null +++ b/src/authutil.ts @@ -0,0 +1,50 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import * as core from '@actions/core'; +import * as github from '@actions/github'; + +export function configAuthentication(registryUrl: string) { + const npmrc: string = path.resolve( + process.env['RUNNER_TEMP'] || process.cwd(), + '.npmrc' + ); + if (!registryUrl.endsWith('/')) { + registryUrl += '/'; + } + + writeRegistryToFile(registryUrl, npmrc); +} + +function writeRegistryToFile(registryUrl: string, fileLocation: string) { + let scope: string = core.getInput('scope'); + if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) { + scope = github.context.repo.owner; + } + if (scope && scope[0] != '@') { + scope = '@' + scope; + } + + core.debug(`Setting auth in ${fileLocation}`); + let newContents: string = ''; + if (fs.existsSync(fileLocation)) { + const curContents: string = fs.readFileSync(fileLocation, 'utf8'); + curContents.split(os.EOL).forEach((line: string) => { + // Add current contents unless they are setting the registry + if (!line.toLowerCase().startsWith('registry')) { + newContents += line + os.EOL; + } + }); + } + // Remove http: or https: from front of registry. + const authString: string = + registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}'; + const registryString: string = scope + ? `${scope}:registry=${registryUrl}` + : `registry=${registryUrl}`; + newContents += `${authString}${os.EOL}${registryString}`; + fs.writeFileSync(fileLocation, newContents); + core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation); + // Export empty node_auth_token so npm doesn't complain about not being able to find it + core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX'); +} diff --git a/src/setup-node.ts b/src/setup-node.ts index c3dcd37d5..ba64e2471 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -1,5 +1,6 @@ import * as core from '@actions/core'; import * as installer from './installer'; +import * as auth from './authutil'; import * as path from 'path'; async function run() { @@ -14,6 +15,11 @@ async function run() { await installer.getNode(version); } + const registryUrl: string = core.getInput('registry-url'); + if (registryUrl) { + auth.configAuthentication(registryUrl); + } + // TODO: setup proxy from runner proxy config const matchersPath = path.join(__dirname, '..', '.github'); console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`); diff --git a/toolkit/actions-github-0.0.0.tgz b/toolkit/actions-github-0.0.0.tgz new file mode 100644 index 000000000..6cbe36dfa Binary files /dev/null and b/toolkit/actions-github-0.0.0.tgz differ diff --git a/tsconfig.json b/tsconfig.json index 25dc099af..1485007f1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,7 +26,7 @@ /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */